Advanced transformer with attention-based neural network framework for precise renal cell carcinoma detection using histological kidney images

Sci Rep 2025 AI 5 Explanations View Original
Original Paper (PDF)

Unable to display PDF. Download it here or view on PMC.

Plain-English Explanations
Pages 1-2
Grading Kidney Cancer from Tissue Slides with AI

Renal cell carcinoma (RCC) makes up nearly 85% of all kidney cancers. It is not a single disease but a diverse group of cancers arising from the cells lining the kidney's tubules, each subtype with distinct molecular characteristics, different responses to treatment, and different survival expectations. Correctly classifying and grading these cancers is critical for guiding treatment decisions.

The standard method for classifying and grading kidney cancer involves a pathologist examining tissue stained with hematoxylin and eosin (H&E) dye under a microscope. H&E staining highlights cell nuclei and surrounding structures, making abnormal patterns visible. However, this process is time-consuming, and two pathologists examining the same slide can reach different conclusions, a well-recognized source of variability in cancer diagnosis.

This study developed a new AI system called ATANNF-IDRCC (Advanced Transformer and Attention-Based Neural Network Framework for the Intelligent Detection of Renal Cell Carcinoma). The system was designed to automatically detect and grade kidney cancer from H&E histopathology images by combining state-of-the-art computer vision components into a unified and highly accurate pipeline.

TL;DR: This study built an AI system combining transformers and attention networks to automatically grade kidney cancer tissue images, achieving 98.26% accuracy across five cancer severity levels.
Pages 2-5
Three-Stage Pipeline: Enhance, Extract, Classify

The ATANNF-IDRCC pipeline works in three sequential stages. The first stage applies CLAHE (Contrast Limited Adaptive Histogram Equalization) to enhance each image. CLAHE improves local contrast in regions of the image that may be poorly lit or inconsistently stained without amplifying noise, producing a cleaner image for subsequent analysis. This step compensates for the variability in staining quality that commonly occurs across different laboratory preparations.

The second stage uses a Twins-SVT (Twins Spatially Separable Vision Transformer) model for feature extraction. Unlike conventional convolutional neural networks that focus on local image patches, vision transformers can analyze relationships between distant parts of an image simultaneously, capturing long-range spatial patterns that are clinically meaningful in histopathology. The spatially separable attention mechanism reduces computational cost while maintaining this global context.

The third stage employs a hybrid BiTCN-BiLSTM-AM classifier combining bidirectional temporal convolutional networks, bidirectional long short-term memory networks, and an attention mechanism. The BiTCN captures temporal patterns in both forward and backward directions, BiLSTM processes sequential feature dependencies, and the attention mechanism selectively highlights the most diagnostically relevant features for the final grade prediction.

All training and testing was performed on the RCCGNet dataset, containing 3000 H&E-stained kidney images evenly distributed across five grades: Grade 0 (normal tissue) through Grade 4 (severe rhabdoid or sarcomatoid differentiation). The dataset was split into 80/20 and 70/30 training-to-testing ratios to assess whether model performance was consistent across different splits.

TL;DR: ATANNF-IDRCC uses image enhancement, a vision transformer for feature extraction, and a hybrid bidirectional classifier to grade kidney cancer images across five severity levels.
Pages 8-10
98.26% Accuracy: Outperforming All Compared Methods

On the 80/20 training-to-test split, ATANNF-IDRCC achieved an average accuracy of 98.26% across all five grades, with precision of 95.69%, recall of 95.70%, and F1 score of 95.65%. The model performed consistently across all five grade categories, not just on the easiest-to-distinguish extreme cases. Grade 3 and Grade 4 tumors, which have the most severe nuclear abnormalities, were classified with particularly high accuracy.

In direct comparison against seven established models including MobileNetV2, ViT, T2T, SwinV2, ConvNeXt, ResNet18, and ResNet34, ATANNF-IDRCC achieved the highest accuracy, precision, recall, and F1 score across all metrics simultaneously. The closest competitor, MobileNetV2, reached 97.94% accuracy but with considerably lower precision and recall compared to ATANNF-IDRCC.

The system also demonstrated exceptional speed, completing classification in 8.28 seconds per case, approximately 23% faster than MobileNetV2, the next fastest model. This is particularly important for potential clinical integration, where processing delays can interrupt pathology workflow. With only 11.00 million FLOPs and 924 MB of GPU memory, ATANNF-IDRCC is also computationally lean, making deployment on standard hospital computing infrastructure realistic.

TL;DR: ATANNF-IDRCC achieved 98.26% accuracy in 8.28 seconds, outperforming all seven competing models on accuracy, precision, recall, and speed simultaneously.
Pages 5-7
How Vision Transformers See Cancer Differently Than CNNs

Traditional convolutional neural networks (CNNs) analyze images by sliding small filter windows across the image, learning local patterns like edges and textures. While effective, CNNs can miss relationships between features in distant regions of the image because their receptive field, the area of the image influencing each neuron, grows only gradually with network depth.

Vision transformers like Twins-SVT address this by using self-attention, a mechanism that allows every part of the image to directly compare itself with every other part in a single step. This global perspective is valuable in histopathology because a pathologist looking at a tumor grade does not just examine one cell but considers the overall arrangement, variation, and density of cells across the entire field of view.

The spatially separable attention in Twins-SVT alternates between local attention within small image groups and global attention across the full image, greatly reducing the computational cost of full self-attention while preserving most of its benefit. This design choice is what allows Twins-SVT to achieve better feature extraction than standard CNNs while remaining practical to deploy in a clinical computing environment.

TL;DR: Vision transformers can see how distant parts of a tissue image relate to each other simultaneously, capturing the global cell organization patterns that pathologists use to grade tumors.
Pages 17-18
A Step Toward Consistent AI-Assisted Pathology

ATANNF-IDRCC demonstrates that combining image enhancement, a spatially aware transformer for feature extraction, and a hybrid bidirectional classifier into a single integrated system produces performance that exceeds any of these components used alone. The ablation study confirmed that removing CLAHE preprocessing, replacing Twins-SVT with a simpler extractor, or removing the attention mechanism each reduced accuracy, validating the contribution of every design decision.

The study's reliance on a single dataset is its primary limitation. RCCGNet, while well-curated and balanced, was collected under controlled conditions. Real pathology laboratories use different staining protocols, different scanners, and encounter tissue samples of highly variable quality. Cross-institutional validation on independently collected slides is the critical next step before this system could be considered for clinical use.

Future development should focus on expanding the training data to include more diverse samples, integrating the system into commercial digital pathology platforms, and exploring whether the same architecture generalizes to grading other cancer types. If these steps are successful, ATANNF-IDRCC-like systems could eventually serve as consistent second opinions for pathologists reviewing kidney cancer cases, reducing diagnostic variability across different hospitals and practice settings.

TL;DR: ATANNF-IDRCC sets a new accuracy benchmark for AI kidney cancer grading, with the architecture validated component by component, though broader dataset validation is needed before clinical deployment.
Citation: Open Access, 2025. Available at: PMC12511621.