
by Christos Evangelou, MSc, PhD – Medical Writer and Editor
Researchers at York University and Sunnybrook Health Sciences Centre in Toronto developed an artificial intelligence (AI) framework that mimics how pathologists analyze tissue samples. The AI framework combines cellular-level analysis with tissue context using a selective attention mechanism and focuses on the most relevant regions within whole-slide images. In validation studies, the framework achieved high agreement with expert pathologists in detecting and staging breast cancer lymph node metastases.
“Our goal is to bring AI closer to how pathologists think: integrating microscopic detail with broader tissue context, while attending to the most relevant regions, including the challenging tumor-normal boundary areas,” said Ali Sadeghi-Naini, PhD, PEng, the study’s senior author and a researcher at York University and Sunnybrook Health Sciences Centre. “We hope this approach moves the field toward AI systems that are not only accurate, but also intuitive, clinically meaningful, and capable of supporting pathologists in making precise and efficient diagnoses.”
The study was published in Scientific Reports.
Study Rationale
Lymph node metastasis is a strong prognostic factor in breast cancer. However, Sadeghi-Naini explained that the current standard method for detecting nodal metastases is labor intensive and prone to inter-observer variability.
“One of the biggest challenges in pathology is that detecting and staging lymph node metastasis still relies on labor-intensive manual review of multiple tissue sections, which is slow, demanding, and subject to variability between observers,” Sadeghi-Naini said.
Sadeghi-Naini added that clinicians need not only a diagnosis, but also precise localization of metastatic regions for accurate staging, something that current AI approaches do not consistently address, especially when precise, patch-level localization is required for staging.
Although deep learning models have been developed to analyze histopathological images, whole-slide images contain heterogeneous tissue structures and complex morphological patterns that make accurate classification challenging. Most existing multiple instance learning (MIL) approaches are optimized for slide-level classification and fall short in patch-level analysis, which is needed to delineate tumor boundaries and determine the extent of metastasis.
A Multi-Scale Approach to Tissue Analysis
The research team developed a framework that processes tissue patches through two pathways. The first extracts nucleus-level features through segmentation and classification of individual cells, and the other captures high-level tissue patterns using a transformer-based architecture. This complementary information is then integrated to create feature representations.
“Tumor-normal boundaries are extremely nuanced,” Sadeghi-Naini stated. “Relying on slide-level MIL features alone often washes out the cellular detail that pathologists use to make these distinctions. By combining nuclei-level features with broader tissue context, and selectively attending only to the most relevant neighboring patches, we preserve both the microscopic and macroscopic insights.”
Sadeghi-Naini explained that the nuclei analysis generates 16-channel feature maps that capture morphological information that pathologists use routinely, including cell type, shape characteristics, staining variations, and texture patterns. He also said that the selective neighborhood attention mechanism enables the system to calculate similarity scores and select the four most relevant neighboring patches for each region.
System Performance
The researchers trained and validated their framework using the CAMELYON16 dataset, which contains 398 whole-slide images from two Dutch medical centers. In test-set evaluation for patch-level tumor detection, the system demonstrated a sensitivity of 96.2%, a precision of 95.3%, and an F1-score of 95.7%. The system achieved a Dice score of 90.5%, a Jaccard index of 82.6%, a lesion-level FROC score of 84.6%, and a slide-level AUC of 0.96.
Statistical comparisons with seven state-of-the-art models showed that the new framework provided significant slide-level AUC improvements (p≤0.024 compared to all benchmark models). The system outperformed Trans-MIL, DS-MIL, DTFD-MIL, CLAM, Bayes-MIL, SAM-MIL, and AB-MIL across multiple evaluation metrics.
Out-of-distribution testing on the CAMELYON17 dataset showed that the model maintained strong performance with a patch-level F1-score of 87.0% and a slide-level AUC of 0.88. For patient-level pN-staging, the framework achieved a kappa score of 0.94 on the complete CAMELYON17 dataset of 100 patients.
“The approach remained robust on out-of-distribution slides, despite variations in staining and scanner conditions,” Sadeghi-Naini said. “This suggests that the model was learning meaningful pathology cues rather than dataset-specific shortcuts.”
The Role of Nuclei Features and Selective Attention
Ablation studies showed that, when nuclei segmentation features were removed, the tissue feature extractor alone achieved lower sensitivity (88.4% vs. 96.2%), specificity (91.0% vs. 94.5%), and F1-score (87.3% vs. 95.7%). The Dice score decreased from 90.5% to 80.5%, and the Jaccard index declined from 82.6% to 75.5%.
Features from the tissue extractor alone showed considerable overlap between normal and tumor patches. After incorporating nuclei features and the selective attention mechanism, the separation between classes became clearer. Patches dominated by neoplastic nuclei formed clear clusters, whereas inflammatory and connective tissue patches exhibited more dispersion.
Future Directions
According to the authors, the framework could streamline workflows by performing initial screening, highlighting areas requiring expert review, and providing preliminary staging estimates.
“We envision this tool as a decision-support system that marks suspicious regions, pre-annotates slides, and provides an initial staging assessment before the pathologist starts their review,” Sadeghi-Naini noted. “It’s not meant to replace experts, but to reduce workload, increase consistency, and allow pathologists to focus their time on the most diagnostically important areas.”
The researchers acknowledge that, although the CAMELYON datasets include slides from multiple institutions, further validation on more diverse histopathological datasets with greater variability in staining protocols and tumor types is needed.
“Our next steps include expanding the framework to larger, more diverse datasets, integrating multi-modal clinical information, and collaborating with hospitals to evaluate performance in real-world workflows,” Sadeghi-Naini said. “We’re also exploring ways to make the system more interactive so that pathologists can guide or refine model outputs in real time.”
The study received financial support from the Natural Sciences and Engineering Research Council of Canada and Terry Fox Foundation through a New Frontiers Program Project Grant with funds from the Lotte and John Hecht Memorial Foundation.
References
- Tauqeer A, Asif A, Sadeghi-Naini A. Detection, localization, and staging of breast cancer lymph node metastasis in digital pathology whole slide images using selective neighborhood attention-based deep learning. Sci Rep. 2025;15(1):37847. Published 2025 Oct 29. doi:10.1038/s41598-025-21787-9
No audio available for this article yet.
No quiz available for this article yet.









