Abstract
Introduction
Determining the HER2 status accurately is a critical determinant in breast cancer treatment planning. Manual scoring remains highly susceptible to inter- and intra-observer variability, particularly in diagnostically ambiguous cases (HER2 1+/2+). Furthermore, contemporary deep learning models frequently lack the robustness and interpretability required for safe clinical integration.
Methods
We propose a hybrid ensemble framework that synergizes EVA-02-Large, Vision Transformer-Base, and ConvNeXt-V2-Nano architectures via an adaptive late-fusion mechanism. The model was trained on the expert-annotated HER2-IHC-40x dataset (
Results
The fused ensemble achieved state-of-the-art weighted accuracy (
Conclusion
This study establishes a highly accurate and interpretable pipeline for automated HER2-IHC scoring, demonstrating that hybrid transformer-CNN ensembles can effectively resolve diagnostically challenging cases. By combining superior predictive performance, structural robustness, and transparent decision-making, the proposed framework offers a highly promising foundational framework that, following prospective multi-reader clinical validation, could serve as a robust decision-support tool to standardize HER2 assessment, reduce inter-observer variability, and accelerate precision oncology workflows.
Keywords
1. Introduction
Breast cancer (BC) is still the number one malignancy diagnosed worldwide. It accounts for nearly 12% of all newly diagnosed cancer cases each year.
1
Among its molecular subtypes, the human epidermal growth factor receptor 2 (HER2)-positive BC subtype, which is defined by ERBB2 gene amplification or protein overexpression, accounts for about
Current clinical guidelines require HER2 scoring to be based on standardized semi-quantitative criteria: scores of 0 or 1+ are negative, 2+ is an equivocal expression that needs to be confirmed by reflex ISH testing, and 3+ is positive. 7 In spite of these procedures, manual IHC reading is still vulnerable to inter- and intra-observer variations, especially in the borderline cases (1+ versus 2+), where the disagreement rate may be more than 20%.8,9 Such uncertainty in diagnosis can result in wrong treatment being given; patients who are deprived of HER2 targeted therapy may be those who would benefit from it and thus are denied effective treatment, while HER2-negative patients may be unnecessarily exposed to toxicity and cost. This highlights the need for a novel and reliable tool that can be used not only for verification but also for routine pathology diagnosis.
The conjunction of digital pathology and artificial intelligence has driven profound deep innovations in computational histopathology. Deep learning, especially convolutional neural networks (CNNs), has proven to be very effective in identifying detailed morphological and textural features from hematoxylin and eosin (H&E)-stained whole-slide images (WSIs) for a variety of cancer-related purposes such as detecting tumors, determining their subtypes, and prognostic stratification.10-12 In continuation of this line of work, researchers have started to utilize the potentials of deep learning for HER2-specific research: Yang et al. 13 used multimodal deep learning by jointly processing H&E images and clinical data for predicting the risk of recurrence in HER2-positive patients; Farahmand et al. 14 used annotated tumor regions of interest to conduct slide-level HER2 classification and achieved an area under the curve (AUC) of 0.90; while Rashid et al. 15 proposed a feature selection strategy based on a metaheuristic search combined with transfer learning for HER2 scoring that reached a high level of accuracy. In addition to these studies, other researchers have also looked at different modalities. For example, the application of ultrasound images for HER2 status prediction through the use of DenseNet models was explored, 16 and a novel hybrid CNN-transformer architecture supported by explainable AI (XAI) methods such as Grad-CAM++ was implemented to enhance model interpretability. 17
Despite these hopeful advances, there are still several methodological and practical limitations that the field of study needs to address. To begin with, many current methods depend on weakly supervised learning paradigms that use slide-level labels only, without pathologist-annotated precise regions of interest, which may lead to dilution of model sensitivity to the features that are diagnostically salient.
14
Secondly, CNNs with a single-architecture might not fully capture the diverse visual signatures that are typical of HER2-IHC staining (from slight membrane intensity gradients to complicated tissue architectural patterns), thus limiting the model’s performance across different institutions and staining protocols.15,17 Thirdly, the lack of large-scale, public, and expertly curated HER2-IHC datasets hinders the development of robust models, their benchmarking, and cross-validation.
16
Last but not least, the “black-box” characteristic of many deep learning systems is a barrier to clinical trust and adoption; therefore, there is a need for explainability frameworks that are incorporated and that map algorithmic decisions to pathological reasoning.
17
Manual HER2-IHC scoring exhibits inter-observer disagreement rates exceeding 20% for equivocal cases (1+ vs. 2+).8,9 Our framework mitigates this variability through deterministic feature extraction, calibrated confidence scoring, and multi-perspective XAI alignment with pathologist-validated criteria. Technically, the model reduced equivocal class misclassification by
To fill the gaps we have mentioned above, we introduce a new hybrid deep learning framework built from the ground up to be automated, interpretable, and of very high fidelity for HER2-IHC scoring. By utilizing the newly released HER2-IHC-40x dataset (a very detailed, expert-annotated collection of more than 10,000 tumor-enriched patches classified into four HER2 expression levels
18
), our design moves away from the typical single-backbone methods by combining three complementary modules: (1) a triplet-feature extraction backbone that blends at synergistic levels the global semantic modeling of EVA-02-Large (strengthened with rotary position embeddings and SwiGLU activations), the pure attention-based context capture of Vision Transformer (ViT)-Base, and the local spatial hierarchy modeling of ConvNeXt-V2-Nano (upgraded with Global Response Normalization); (2) an adaptive late-fusion mechanism that links the high-level feature vectors from each of the three backbones in a single 2432-dimensional representation, this representation then going through a multi-layer perceptron (MLP) head for dynamic usage of class-discriminative features; and (3) a wholly XAI system which takes advantage of three attribution methods (Grad-CAM, Grad-CAM++, and Layer-CAM) to supply multi-perspective saliency maps, thus, model’s attention is rigorously aligned with the human expert-defined areas of interest like membrane staining intensity and nuclear morphology. In sum, our main achievements are. • Introducing a hybrid ensemble architecture that not only attains state-of-the-art classification performance (Weighted Accuracy: • A thorough statistical analysis of the results from ten independent runs, a complete perturbation study (testing the models robustness to 20+ types of image corruptions), along with calibration metrics, resulting in a direct comparison of our framework with baseline architectures under the same experimental settings. • An interpretability investigation from multiple perspectives illuminating that the models classification criteria are derived from the morphologically and clinically relevant features in histopathology rather than being influenced by artifacts, thus enabling oncological applications to benefit from model transparency and clinical trust for the deployment stage.
This work pushes the boundaries of AI-assisted HER2 assessment by connecting innovation in methods with clinical utility. We have set up a reproducible, interpretable, and high-performance framework based on expert-validated data, which can reduce the inter-observer diagnostic variability, speed up the therapeutic decision-making, and finally, provide more personalized and effective care for patients with HER2-positive breast cancer.
2. Materials and Methods
This study conforms to the TRIPOD + AI statement for reporting clinical prediction models that utilize machine learning methods. 19 The reporting of this study conforms to the TRIPOD + AI statement. 19 This work describes the development and internal validation of a hybrid ensemble prediction model for automated HER2-IHC scoring in breast cancer histopathology.
This section describes the methodological framework developed for the automatic assessment of HER2-IHC status. The HER2-IHC-40x dataset is used to create a powerful pipeline that combines sophisticated preprocessing techniques with a hybrid ensemble architecture. As shown in Figure 1, the system consists of three different backbone networks for capturing multi-scale morphological features, which are then combined by an adaptive fusion mechanism. Besides that, to tackle the issue of deep learning models being “black boxes”, a multi-pronged XAI module has been added, which helps to verify the model’s decisions with the histopathological patterns that doctors recognize. The rest of the sections are dedicated to a thorough mathematical and structural explanation of each aspect, including data curation, model architecture, optimization strategy, and interpretability techniques. Architectural overview of the proposed hybrid deep learning framework for HER2-IHC scoring where parallel backbone networks (EVA-02-Large, Vision Transformer (ViT)-Base, and ConvNeXt-V2-Nano) process input histopathology patches through a pipeline, and they extract complementary global and local features. The feature vectors are concatenated and passed through an MLP head for classification. The training regimen uses Exponential Moving Average (EMA) to stabilize the weights. After inference, an ensemble of explainability methods (including Grad-CAM, Grad-CAM++, and Layer-CAM) creates saliency maps to emphasize the most diagnostic regions
2.1. Materials
This work employs the HER2-IHC-40x dataset,
18
publicly available at https://zenodo.org/records/15179608, a high-resolution histopathology dataset specifically curated for HER2 immunohistochemistry (IHC) scoring of breast cancer. The dataset (see Figure 2) comprises Twelve samples from the utilized dataset: HER2-IHC-40x dataset
18
where each column reflects a specific HER2 score (
2.2. Mathematical Preprocessing Pipeline
Let
Although histopathology images exhibit distinct color distributions relative to natural images, prior studies have demonstrated that ImageNet-normalized features remain effective for medical image analysis when combined with domain-specific fine-tuning. To further mitigate domain shift and enhance generalization to staining variability encountered in multi-institutional workflows, we incorporate a stochastic augmentation pipeline
This augmentation strategy encourages linear behavior between classes and improves robustness to photometric variations; thereby supporting reliable performance across diverse histopathological imaging conditions. Test and validation set patches receive only intensity normalization and artifact removal to ensure unbiased evaluation.
2.3. Model Architecture and Mathematical Formulation
We selected three specific architectures to represent complementary inductive biases, moving from global attention mechanisms to hierarchical convolutional processing. EVA-02-Large was chosen for its state-of-the-art global semantic modeling via SwiGLU activations and Rotary Position Embeddings (ROPE). ViT-Base serves as a pure attention baseline devoid of convolutional priors, ensuring unbiased global context capture. Finally, ConvNeXt-V2-Nano was selected to capture local spatial hierarchies using modernized convolutional designs upgraded with Global Response Normalization (GRN). Other contemporary architectures were either subsumed by these choices or found in preliminary experiments to offer less complementary inductive biases for the multi-scale nature of HER2-IHC staining. Subsections below present the detailed mathematical formulations and structural components of each architecture.
2.3.1. EVA-02-Large Architecture
The EVA-02-Large model
21
is based on a ViT framework but with some upgraded features. For an input image
2.3.2. Vision Transformer-Base Architecture
The ViT-Base model as described in 22 initially converts input image into tokens through patch tokenization of size
2.3.3. ConvNeXt-V2-Nano Architecture
ConvNeXt-V2-Nano
23
updates convolutional networks by adding the design features of transformers. For input
2.3.4. Feature Fusion and Prediction Head
Let
This concise formulation allows the MLP to dynamically learn the non-linear weighting of class-discriminative features. The final class prediction
2.4. Training Protocol and Optimization Mathematics
2.5. Explainability and Visual Interpretability Analysis
Building clinical trust and aligning the explanations with pathological reasoning have been some of the main concerns addressed by the proposed framework that develops a holistic combination of Explainable AI (XAI) techniques. Instead of depending on a unique attribution method that may be biased toward a specific method, our approach is based on a multifaceted interpretability strategy that draws on Gradient-weighted Class Activation Mapping (Grad-CAM), 25 its generalized successor Grad-CAM++,26,27 and Layer-CAM. 28 Such a combination approach thus enables cross-checking of the saliency areas, resulting in the model’s attention mechanisms continuously pinpointing the diagnostically relevant histopathological features even when different attribution paradigms are applied.
Among them, due to its better ability in recognizing multiple occurrences of class-specific features in an image, which is usually the case with heterogeneous tissue structures, etc., Grad-CAM++ is taken as the main localization method. Let’s say, for instance, a target class
The output coarse localization map is given by
2.6. Algorithmic Framework
The proposed approach is a hybrid ensemble framework summarized in Algorithm 1 which basically shows the whole pipeline. It starts with the preprocessing and augmentation of the data and then the feature extraction is done in parallel with the triplet backbone architecture (EVA-02, ViT, and ConvNeXt). The training loop involves adaptive learning rate scheduling, EMA weight stabilization, and mixed-precision optimization. Inference protocol is the last stage that involves deployment of smoothed weights and generation of multi-perspective explainability maps for clinical interpretability.
Algorithm 1. The training and inference pipeline for the Hybrid Ensemble Framework with EMA stabilization and Multi-Perspective XAI.
3. Experimental Results and Discussion
3.1. Results
Top-Performing Preprocessing and Model configurations Ranked by Weighted F1-Score Across Ten Independent Trials
Abbreviations: BAC = Balanced Accuracy; F1-Score = Harmonic mean of Precision and Recall.
Note. Values represent mean
Among the independent backbones, the EVA-02-Large architecture demonstrated the best results, with a weighted average accuracy of
Most importantly, the proposed Fused (Ours) method, which combines the feature vectors of all three backbones through a weighted adaptive fusion mechanism, has delivered state-of-the-art results for all the metrics. The ensemble has recorded a weighted average accuracy of
Figures 3-5 show a detailed breakdown of individual models via normalized confusion matrices as well as Precision-Recall Curves (PRC). The confusion matrices depict that all models have hardly any problems with classes that are visually very distinct (0 and 3+), however, the main difficulty is in 1+ and 2+ borderline categories differentiation. The EVA-02-Large model (Figure 3A) among single models has the most intense diagonal for these ambiguous classes. The PRCs also confirm this fact, with EVA-02 being able to stay at a high precision even when the recall level for minority classes is also greatly increased. To provide deeper clinical insight into the model’s diagnostic behavior, we conducted an additional qualitative analysis of challenging misclassified HER2 equivocal cases. We observed that misclassifications between 1+ and 2+ predominantly occurred in patches exhibiting weak, heterogeneous membrane staining accompanied by high cytoplasmic background noise. This analysis identifies the specific morphological boundaries where the model struggles, guiding future data curation and hard-negative mining efforts. Performance evaluation of the EVA-02-Large architecture where: (a) The normalized confusion matrix illustrating the classification distribution across the four HER2 expression classes (0, 1+, 2+, 3+); highlighting the model’s proficiency in distinguishing equivocal cases. (B) The multi-class PRC demonstrating the trade-off between precision and recall for each class; with the micro-average indicating robust overall performance on the test set Performance evaluation of the ViT-Base/P16 architecture where: (a) prediction performance of the HER2 classes by means of a confusion matrix; highlighting the fact that the model achieved very high true-positive rates for the two extreme categories over-expression (3+) and negative (0). (B) PRC for class-specific and sample macro-average exemplify the transformer’s strength in capturing global contextual information for accurate scoring Evaluation of the ConvNeXt-V2-Nano where: (A) normalized confusion matrix showing the classification behavior of the updated convolutional backbone in particular its capability in segregating borderline 1+ and 2+ cases. (B) PRC of individual classes; reflecting the model’s compromise between sensitivity and positive predictive value over the diverse dataset


To confirm the statistical significance and reliability of the above-mentioned results, we performed multi-trial Receiver Operating Characteristic (ROC) analyses. The 10 runs’ average ROC curves with 95% confidence intervals (shaded areas) are displayed in Figures 6-8. The tight confidence intervals (CIs) for all the architectures indicate low variation and thus high reproducibility. The insets (top-left quadrant of each) show the model’s behavior at the clinically important level of high specificity (False Positive Rate Multi-trial ROC analysis for the EVA-02-Large architecture. The solid line represents the mean ROC curve aggregated over 10 independent trials, while the shaded region denotes the 95% CI, illustrating model stability. The inset (top-left) provides a magnified view of the critical operating region; highlighting the model’s high sensitivity and specificity in distinguishing HER2 classes Multi-trial ROC analysis for the ViT-Base/P16 architecture. Mean ROC curves and corresponding 95% CIs are plotted based on 10 independent experimental runs. The narrow confidence bands indicate low variance across trials Multi-trial ROC analysis for the ConvNeXt-V2-Nano architecture where it displays the average performance over 10 trials with shaded areas representing the 95% CIs


3.2. Explainability Using CAM Techniques
To close the gap between high-dimensional feature learning and clinical interpretability, we decided to qualitatively evaluate the model’s decision-making process based on three different Class Activation Mapping (CAM) methods: Grad-CAM, Grad-CAM++, and Layer-CAM. Figure 9 shows the spatial attention maps that were produced for two representative test cases with correct classifications made with high confidence ( Explainability analysis across three attribution techniques for distinct HER2 expression classes. It presents saliency maps generated by (Row 1) Grad-CAM, (Row 2) Grad-CAM++, and (Row 3) Layer-CAM. The left column displays results for a representative HER2-negative (Class 0) sample, while the right column shows a HER2-low positive (Class 1+) case, both correctly predicted with confidence scores exceeding 
In the HER2-negative sample (Class 0), all three methods identify the nuclear regions stained with hematoxylin as the main focus areas of the first attention layer and at the same time, they are able to elegantly ignore the eosinophilic cytoplasmic and stromal background. This is exactly what we have seen Score 0 in pathology, where lack of membranous staining is the main distinguishing feature. In this context, Grad-CAM++ (Figure 9; second row) and Layer-CAM (Figure 9; third row) offer a higher level of detail in the spatial domain than the traditional Grad-CAM (Figure 9; first row) as they have less spatial dilution and so they can even show different tumor cell clusters.
In contrast, with the HER2-low positive case (Class 1+), the attribution maps refocus the attention on the cellular boundaries, detailing the characteristic faint, incomplete membrane staining of this ambiguous category. While regular Grad-CAM (Figure 9; first row) identifies the main area of interest, it has a broader activation spread which sometimes includes the adjacent stromal tissue. Conversely, Grad-CAM++ (Figure 9; second row) and Layer-CAM (Figure 9; third row) clearly reveal their advantage in specificity by showing only the tumor cell membranes as the high-activation zones that they tightly restrict. This better pinpointing is of great importance for differentiating Class 1+ from Class 2+ (equivocal) and Class 0 since it shows that the model’s high confidence prediction is based on the occurrence of subtle membranous intensity rather than non-specific tissue texture or artifact. The agreement among these different explainability frameworks confirms that the suggested system identifies biologically sound features thus enhancing the level of transparency that is essential for the clinical acceptance of automated HER2 scoring workflows.
To evaluate agreement among attribution methods, we computed pairwise Intersection-over-Union (IoU) scores and Pearson correlation coefficients between binarized saliency maps (thresholded at the 90th percentile of activation) across 500 randomly sampled test patches. Mean IoU values were: Grad-CAM vs. Grad-CAM++ =
3.3. Perturbation Analysis and Robustness Evaluation
To assess clinical reliability under real-world conditions, we conducted a comprehensive perturbation study encompassing
Results reveal a bifurcated robustness profile. The model demonstrates strong resilience to structural and geometric perturbations (including occlusion, fog, shadow, and Gaussian noise) with
Figure 10 visualizes the joint accuracy-ECE landscape across perturbation types and severity levels, highlighting a photometric vulnerability region where calibration deteriorates most sharply. Figure 11 ranks robustness via normalized mCE, reinforcing that while the model tolerates structural noise effectively, targeted mitigation of stain variability (via physics-informed normalization or adversarial augmentation) remains essential for multi-center deployment. Clinically, structural corruptions simulate common acquisition artifacts, whereas photometric shifts model inter-scanner and inter-laboratory staining heterogeneity; addressing the latter is critical for ensuring reliable HER2 scoring across diverse institutional settings. Calibration and accuracy landscape under perturbations where the heatmap shows the joint distribution of model accuracy and ECE depending on different perturbation types (y-axis) and severity levels (x-axis). The color intensity depicts the magnitude of ECE with warmer colors (red/orange) indicating areas where the model confidence diverges significantly from the true accuracy (miscalibration). Cooler colors (blue/green) indicate the stable regimes where the model accuracy is high and the confidence estimates are reliable at the same time Quantitative Robustness Ranking via mCE where the bar chart depicts the normalized mCE for each perturbation category; serving as an aggregate metric of model fragility. Lower mCE values (closer to 0) indicate superior robustness; while higher values signify significant performance degradation relative to the baseline

3.4. Comparison With Related Studies
Comparison of the Proposed Framework With Related Studies in HER2 Scoring and Breast Cancer Histopathology
Abbreviations: H&E = Hematoxylin and Eosin; WSI = Whole Slide Image; ROI = Region of Interest; CV = Cross-Validation; AUC = Area Under the Curve; Acc = Accuracy; Prec = Precision; Spec = Specificity; Sens = Sensitivity; F1 = F1-Score; BAC = Balanced Accuracy; mCE = mean Calibration Error; XAI = Explainable AI; EMA = Exponential Moving Average; MCB = Multimodal Compact Bilinear pooling; NSGA-II = Non-dominated Sorting Genetic Algorithm II; FlLpF = Feature-level Local Pattern Filtering.
Note. Values for the proposed framework represent mean
Several key distinctions emerge from this comparison. First, while prior works predominantly rely on H&E-stained sections,13,14 our framework is explicitly designed for HER2-IHC scoring, directly modeling the membrane staining patterns that constitute the clinical gold standard. 2 Second, the proposed triplet-backbone architecture captures complementary inductive biases: global semantic dependencies (EVA-02), pure attention-based context modeling (ViT), and hierarchical local feature extraction (ConvNeXt), whereas single-backbone approaches may underrepresent the multi-scale morphological signatures characteristic of equivocal HER2 classes. Third, our adaptive late-fusion mechanism operates at the high-level feature space, enabling dynamic weighting of discriminative representations without the computational overhead of iterative metaheuristic search. 15 Finally, the multi-perspective XAI protocol provides convergent evidence that model decisions are grounded in pathologically relevant features, thereby enhancing clinical trust and facilitating regulatory adoption; a consideration largely absent in prior methodological contributions. Compared to recent single-backbone or weakly supervised HER2-IHC frameworks, our novelty lies explicitly in the triplet-backbone adaptive fusion and the multi-perspective XAI protocol, which directly resolve the limitations of prior models that struggle with the multi-scale morphological signatures of equivocal classes.
4. Limitations
Despite the strong performance and comprehensive evaluation presented in this study, several limitations warrant acknowledgment. First, while the model demonstrates robustness to geometric and structural perturbations, our perturbation analysis revealed notable sensitivity to photometric variations; particularly extreme alterations in brightness, contrast, and saturation. This vulnerability reflects real-world challenges in histopathology, including inter-laboratory staining variability and differences in scanner hardware. Although standard data augmentation was employed, the pronounced performance decline under severe intensity corruptions suggests that future iterations should integrate physics-informed stain normalization techniques (e.g., Macenko or Vahadane methods) or adversarial training targeting the color-intensity manifold to enhance cross-institutional generalizability.
Second, this work utilizes the HER2-IHC-40x dataset, an expert-annotated, high-resolution resource curated from a single institutional cohort. While this dataset enables rigorous internal validation, the framework’s generalizability to external multi-center cohorts with diverse staining protocols, tissue fixation methods, and scanning platforms remains to be established. To address this, our future work incorporates a structured external validation roadmap: retrospective evaluation on publicly available benchmark datasets (including BACH, 29 CAMELYON16/17, 30 and the TCGA-BRCA HER2-annotated subset) to assess cross-domain performance, coupled with nested cross-validation protocols (outer loop for performance estimation, inner loop for hyperparameter tuning) to ensure unbiased generalization estimates and mitigate model selection bias.31-35
Third, the hybrid ensemble architecture integrates three distinct backbones, which increases computational complexity (FLOPs) and memory requirements relative to single-model baselines. While the patch-level nature of the input allows for highly parallelized inference on modern GPU clusters, this design may constrain deployment in resource-limited clinical environments. Currently, the fused model requires approximately three times the inference latency of a single backbone. A comprehensive discussion of inference efficiency is therefore critical; future optimization efforts will explore model compression strategies (including knowledge distillation, structured pruning, and 8-bit quantization) to reduce inference latency and hardware requirements, thereby improving deployment feasibility in routine digital pathology workflows without compromising diagnostic fidelity.
Fourth, the current framework relies on patch-level evaluation, which warrants clarification regarding slide-level aggregation for routine pathology deployment. In a clinical workflow, patch-level predictions must be aggregated to generate a final slide-level HER2 score. Future implementations will employ attention-based Multiple Instance Learning (MIL) or weighted majority voting to synthesize these patch-level outputs. While this introduces additional computational overhead for whole-slide inference, it is a necessary step to align with standard pathologist reporting practices.
Finally, although our multi-perspective XAI analysis confirms that model attention aligns with pathologist-validated morphological features (e.g., membrane staining intensity), the current framework provides post-hoc interpretability rather than intrinsically transparent decision-making. Incorporating explainability constraints directly into the training objective (such as attention-guided loss functions or concept bottleneck architectures) represents a promising direction for developing inherently interpretable models that facilitate clinical trust and regulatory adoption.
5. Conclusions and Future Directions
This study presents a high-fidelity deep learning framework for automated HER2-IHC scoring in breast cancer histopathology. By synergizing EVA-02-Large, ViT-Base, and ConvNeXt-V2-Nano through an adaptive late-fusion mechanism, our ensemble achieved state-of-the-art weighted accuracy (98.05%) and balanced accuracy (98.25%). Critically, the framework demonstrated superior proficiency in resolving diagnostically ambiguous equivocal cases (HER2 1+ and 2+), thereby addressing a persistent source of inter-observer variability in routine clinical practice. Integration of a multi-perspective explainability module (Grad-CAM, Grad-CAM++, and Layer-CAM) confirmed that model decisions are grounded in pathologist-validated morphological features, including membrane staining intensity and nuclear architecture, which is essential for fostering clinical trust and facilitating regulatory adoption.
While the model exhibits robustness to structural perturbations, its sensitivity to photometric variations underscores the need for enhanced domain generalization. To address this limitation and strengthen clinical translatability, we have established a comprehensive future research roadmap. Near-term efforts will prioritize the integration of physics-informed stain normalization techniques and adversarial training protocols designed to mitigate intensity-based degradation across diverse laboratory settings. Concurrently, we will implement a structured external validation strategy: Phase 1 will involve retrospective evaluation on public benchmark datasets (BACH, CAMELYON16/17, and TCGA-BRCA HER2 subsets) utilizing nested cross-validation to ensure unbiased performance estimation; Phase 2 will expand to prospective multi-institutional cohorts to assess real-world generalizability across varied pre-analytical conditions; and Phase 3 will conduct clinical utility studies comparing pathologist diagnostic agreement with and without AI assistance. Additionally, we will explore model compression strategies, including quantization and knowledge distillation, to optimize computational efficiency for deployment in resource-constrained clinical environments. Standardized evaluation scripts and pre-processed benchmark splits will be publicly released to facilitate reproducible research and accelerate community-wide progress in automated HER2-IHC scoring. By unifying architectural innovation, rigorous robustness assessment, and transparent decision-making, this framework establishes a foundational benchmark that, pending rigorous prospective clinical trials, paves the way for the future integration of AI-assisted diagnostics into routine oncological workflows; ultimately supporting more precise and personalized therapeutic management for patients with HER2-positive breast cancer.
Footnotes
Acknowledgements
The authors extend their appreciation to the Deanship of Scientific Research and Libraries in Princess Nourah bint Abdulrahman University for funding this research work through the Research Group project, Grant No. (RG-1445-0062).
Ethical Cosiderations
Consent to Participate
Patient informed consent was waived by the originating Institutional Review Board due to the retrospective nature of dataset curation and the use of fully de-identified histopathology images. No personal identifiable information was accessed or utilized in this research.
Author Contributions
Hossam Magdy Balaha: Conceptualization, Methodology, Software, Formal analysis, Writing - original draft, Investigation, Visualization, Validation, Writing - review & editing. Norah Saleh Alghamdi, Nithya Rekha Sivakumar, and Shakila Basheer: Funding, Validation, Visualization, Writing - review & editing. Khadiga M. Ali: Validation, Visualization, Writing - review & editing. Ayman El-Baz: Supervision, Funding, Validation, Visualization, Writing - review & editing. All authors have read and agreed to the published version of the manuscript.
Funding
The authors received no financial support for the research, authorship, and/or publication of this article.
Declaration of Conflicting Interests
The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Data Availability Statement
The dataset supporting this study is available from a public repository upon reasonable request.
Intellectual Property
We have followed the regulations of our institutions concerning intellectual property.
Use of Artificial Intelligence Statement
No generative artificial intelligence tools were used for content generation, data analysis, figure creation, or manuscript writing. All scientific content, interpretations, and conclusions were generated solely by the authors.
