Abstract
Cutaneous vasculitis represents a heterogeneous group of disorders characterized by inflammation and necrosis of blood vessels within the skin, with or without systemic involvement. The pathological diagnosis of cutaneous vasculitis remains a significant challenge due to its pathological manifestations overlapping with various inflammatory skin diseases and the inherent subjectivity of manual diagnostic criteria. This study leveraged deep learning technology to develop a reliable diagnostic model for whole slide images (WSIs) of cutaneous vasculitis, aiming to standardize and enhance the consistency of cutaneous vasculitis pathology assessment. The study incorporated WSIs from two medical research centers between 2018 and 2024, comprising 378 WSIs of cutaneous vasculitis, 285 WSIs of edematous dermatitis, 286 WSIs of granulomatous inflammation, and 247 WSIs of panniculitis. To circumvent the substantial resource burden associated with pixel-by-pixel manual annotation of ground truth labels, this study implemented a weakly-supervised learning strategy that required only pathological diagnostic reports as labels. The results demonstrated that the deep learning-based WSI diagnostic model achieved an impressive AUC of 98.39% in multi-classification diagnostic tasks, serving as a standardized adjunct to help mitigate the variability and inconsistency inherent in manual diagnosis. Furthermore, the model can generate diagnostic predictions within milliseconds and highlight regions containing highly suspicious diagnostic evidence, significantly enhancing pathologists’ work efficiency.
Keywords: Cutaneous vasculitis, Deep learning, Pathological diagnostic model
Subject terms: Computational biology and bioinformatics, Diseases, Medical research
Introduction
Cutaneous vasculitis (CV) represents a heterogeneous group of disorders characterized by inflammatory involvement of small dermal vessels. This condition may present either as a cutaneous manifestation of systemic vasculitis or as an isolated skin-limited entity. The clinical spectrum of CV encompasses diverse morphological presentations, including but not limited to palpable purpura, dermal nodules, ulcerative lesions, and necrotic lesions1–3. Cutaneous vasculitis affects different parts of blood vessels, ranging from large vessels (as seen in giant cell arteritis and Takayasu arteritis)4 to medium-sized vessels (such as in polyarteritis nodosa and Kawasaki disease)5, and then to small vessels (like granulomatous polyangiitis, microscopic polyangiitis, IgA cutaneous vasculitis and cutaneous leukocytoclastic cutaneous vasculitis6. This kind of diseases exhibits non-specific symptoms including fever, weight loss and myalgia, and depending on the size, location and number of the affected blood vessels, specific combinations of symptoms may also occur. Cutaneous vasculitis can occur in people of any age group and may present with either an acute or chronic course, with its severity varying from mild skin manifestations to life-threatening conditions1,2,7.
Skin biopsy remains the gold standard for diagnosing cutaneous vasculitis (CV)8,9, especially when serological tests (such as ANCA) are normal10,11. Carlson et al. emphasize that histopathological confirmation of CV should not solely rely on vascular wall disruption, but rather integrate a constellation of features including inflammatory cell typology, perivascular distribution patterns, and the extent of fibrinoid necrosis12.Furthermore, CV exhibits substantial clinicopathological overlap with other entities such as Edematous Dermatitis13, Granulomatous Inflammation14 and Panniculitis15, compounding diagnostic challenges.
In recent years, the application of artificial intelligence, especially deep learning16 technology, in medical image analysis has been continuously deepening17. Particularly in the fields of assisting in the diagnosis of diseases such as those related to the brain, cervix, eyes and skin, a series of important breakthroughs have been achieved18,19. Deep learning algorithms can automatically learn the complex features and patterns in images and are expected to overcome the limitations of manual diagnosis20,21. However, when constructing deep learning models, a large amount of precisely annotated training data, namely ground truth, is usually required22. For pathological images, it is not only time-consuming and laborious but also costly for pathologists to manually annotate the ground truth pixel by pixel, which has become a major obstacle to the application of deep learning technology in pathological diagnosis23.
Against this background, the weakly-supervised learning strategy has emerged. Weakly-supervised learning24 only requires relatively simple and easily obtainable label information (for example, only the reported pathological diagnoses are used as labels in this study), without the need for cumbersome pixel-by-pixel annotation, thus greatly reducing the cost and workload of data annotation25. This strategy provides new ideas and methods for constructing a diagnostic model for WSIs of cutaneous vasculitis pathology. It is expected to develop efficient and reliable diagnostic models using limited annotation resources, achieve more accurate, consistent and efficient pathological assessment of cutaneous vasculitis, and promote the progress and development of cutaneous vasculitis diagnosis technology.
We address the existing problems in clinical work by collecting a large computational pathology dataset and introduce a deep learning framework to train classification models without the need for pixel-level annotations. Moreover, based on the results obtained in this work, we will formalize the concept of a clinical-level decision support system. Compared with the existing literature, we propose a new measure of clinical applicability and assist in reducing intra- and inter-observer variability of manual diagnosis.
Currently, the weakly-supervised WSI classification methods rely on deep learning models trained under variants of the Multiple Instance Learning (MIL) assumption. Firstly, a classifier is trained using MIL at the patch level, and then the prediction scores of each patch in the WSI are aggregated, usually by learning a fusion model. Inspired by these works, our framework utilizes MIL to train deep neural networks, thereby generating patch-level feature representations that are semantically rich. These representations are then used in a feature fusion network to integrate the information of the entire slide and report the final classification results.
We have achieved a high AUC of 98.39% in the classification task of cutaneous vasculitis and three other similar cutaneous vasculitis-related diseases, and it only takes milliseconds of working time, demonstrating high accuracy and rapid processing speeds that strongly complement manual diagnosis. In addition, the architecture we designed can effectively identify highly suspicious lesions and has been recognized by pathologists, indicating that the combination of deep learning and manual diagnosis can provide patients with safer and more immediate healthcare.
Materials and methods
Patient cohort
Our study was approved by the Ethics Review Committee. This study was approved by the First Hospital of China Medical University and the Tianjin Academy of Traditional Chinese Medicine Affiliated Hospital Ethics Committee (Approval Number: [2020-196-2]) and this study is conducted in accordance with the relevant guidelines. Written informed consent was obtained from all individual participants included in the study. The inclusion criteria were as follows: (1) Storing the pathological tissue slides stained with hematoxylin and eosin (H&E) as digital whole slide images (WSIs); (2) Clearly defining the diseases. The exclusion criteria during data enrollment were as follows: The areas of pathological images were blurry or unclear; It was impossible to segment the regions of interest (ROIs) on the whole slide images. A total of 1,196 whole slide images (WSIs) were ultimately included in the study, collected from the Affiliated Hospital of Tianjin Academy of Traditional Chinese Medicine and the First Affiliated Hospital of China Medical University. These comprised 378 cases of cutaneous vasculitis, 285 cases of spongiotic dermatitis, 286 cases of granulomatous inflammation, and 247 cases of panniculitis. The training set and test set were divided at a 3:1 ratio.
Furthermore, the development and validation of the deep learning model in this study adhere to the TRIPOD-AI (Transparent Reporting of a multivariable prediction model for Individual Prognosis or Diagnosis - Artificial Intelligence) reporting guidelines. The completed TRIPOD-AI checklist is provided in the Supplementary Material.
Data acquisition
WSIs were generated using scanning devices from Carbonica EasyScan.
Pathology examination
Based on histopathological findings, the CV cohort was stratified into specific subclasses. IgA vasculitis was the predominant subtype, accounting for 27.8% (105/378) of the cases; Necrotizing vasculitis, presenting with fibrinoid necrosis of the vessel walls, constituted 25.9% (98/378) of the cohort; Leukocytoclastic vasculitis (LCV) was accounting for 19% (72/378) of the cases, characterized by karyorrhexis and neutrophilic infiltration. Other variants accounted for the remaining 27.2%.
In this study, all the included WSIs underwent immunohistochemical processing for pathological evaluation. As shown in Fig. 1, two senior pathologists conducted a systematic review of these sections and provided the final diagnostic opinions. In cases where it was difficult to make a determination, a third pathologist was brought in for additional assessment, and a consensus was reached through group discussion. Moreover, all the diagnostic results also needed to be finally reviewed by a fourth pathologist.
Fig. 1.
Pathology examination.
Diagnostic criteria and differential diagnosis
To rigorously differentiate cutaneous vasculitis (CV) from mimickers sharing pathological features, such as granulomatous polyangiitis (GPA) and erythema induratum (EI), a standardized diagnostic workflow was employed. Diagnoses were established based on a combination of histopathology, direct immunofluorescence (DIF), autoantibody profiling, and clinical follow-up. Pathological evaluation systematically assessed for the presence of extravascular granulomas (to exclude typical GPA) and significant lobular panniculitis with fat necrosis (to exclude EI).
DIF were performed to evaluate vascular immune complex deposits (IgA, IgG, IgM, and C3). Furthermore, comprehensive serological testing, including Anti-Neutrophil Cytoplasmic Antibody (ANCA) profiles, was conducted for all patients to differentiate skin-limited CV from systemic ANCA-associated vasculitis.
Construction of the deep learning model
In our study, in order to address the weakly-supervised classification challenges faced by WSIs in pathological diagnosis, we adopted the MIL architecture based on the Transformer26, namely TransMIL27. For WSIs, the detailed pixelwise annotation for training deep learning models is not only extremely time-consuming but also demands a high level of pathological expertise. Considering that these images usually have a high-resolution characteristic with billions of pixels, it is practically infeasible to require comprehensive annotation for the entire slide. Therefore, the weakly-supervised learning strategy becomes an effective approach, which trains the model using relatively coarse labels while still achieving high task accuracy. The structure of the model is shown in Fig. 2.
Fig. 2.
Model structure.
Image segmentation: CLAM’s ‘create_patches_fp.py’ was used for tissue segmentation. As shown in Fig. 3, we performed automated tissue region segmentation on each WSI to ensure that non-overlapping patches with a size of 224 × 224 pixels could be precisely demarcated. During this process, special attention was paid to excluding background regions, especially those with a saturation lower than 15%, ensuring that our analysis could focus on the most informative areas within the tissue samples.
Fig. 3.
Image segmentation.
Feature extraction: Subsequently, a pre-trained Convolutional Neural Network (CNN)28 was employed for feature extraction. The goal of this step was to transform all tissue patches into low-dimensional feature embeddings, effectively reducing the dimension of the feature space and thus decreasing the computational resources required by the subsequent deep learning model. Feature extraction is a crucial step for improving model performance. We used Vision Transformer (ViT)29 and ResNet5030 for feature extraction and compared the results. Eventually, we decided to use ResNet5031.
Implementation Details: Hardware/Software: The model was developed using the PyTorch framework (version 1.12.1) and trained on a workstation equipped with dual NVIDIA A6000 GPUs.
Architecture and pre-training: For feature extraction, we utilized ResNet50 and the standard Vision Transformer Small variant with a patch size of 224 × 224 (ViT-Large). Both extractors were initialized with weights pre-trained on the ImageNet-1 K dataset. While pathology-specific foundational models (e.g., Phikon) are emerging, our empirical tests showed that ImageNet pre-training coupled with the TransMIL architecture provided highly robust feature representations for this specific classification task.
Results
Experimental details
In this experiment, the number of epochs was set to 200. Meanwhile, an early stopping mechanism was established to avoid overfitting. The four-fold cross-validation method was adopted in the experiment. Lookahead RAdam32 was used as the optimizer with a learning rate of 0.0002 and a weight decay of 0.00001. The cross-entropy loss was selected as the loss function. RAdam (Rectified Adam) stabilizes early training by rectifying the variance of the adaptive learning rate. The integrated ‘Lookahead’ mechanism further enhances this by maintaining two sets of weights: ‘fast’ weights that update at each step, and ‘slow’ weights that interpolate toward the fast weights periodically. This k-steps-forward, 1-step-back approach effectively mitigates oscillation in deep networks and allows the model to escape local minima more robustly, which is particularly beneficial when handling the extreme high-dimensionality of weakly-supervised WSI classification.
Classification performance
We evaluated the classification performance of our constructed deep learning model for cutaneous vasculitis, edematous dermatitis, granulomatous inflammation, and panniculitis. The assessment employed comprehensive performance metrics to thoroughly examine the model’s effectiveness across different diagnostic categories. Figure 4 illustrates the evolution of the loss function values throughout the training process, demonstrating the stable convergence of the model.
Fig. 4.
Training and testing loss curve.
A comparative analysis was conducted on two distinct feature extraction architectures, ResNet50 and ViT, implemented with three different algorithms: TransMIL, CLAM(SB)31, and CLAM(MB)31. Our evaluation metrics encompassed accuracy (ACC), ROC area under the curve (ROC-AUC), and recall rates for each disease category, collectively providing a comprehensive perspective on model performance (Tables 1 and 2). The ResNet50 architecture with TransMIL algorithm demonstrated superior performance across all evaluation metrics, notably achieving an exceptional ROC-AUC of 98.4%, indicating robust classification capabilities. The CLAM(MB) algorithm exhibited satisfactory performance with ACC and ROC-AUC values of 94.5% and 97.7%, respectively, while the CLAM(SB) algorithm showed relatively lower performance on these metrics. In the ViT architecture implementation, the TransMIL algorithm similarly achieved impressive scores, with ACC and ROC-AUC values of 90.9% and 97.3%, respectively, demonstrating its efficacy in feature extraction. However, the CLAM(SB) algorithm’s performance was comparatively lower at 92.7%, potentially indicating limitations in positive sample identification.
Table 1.
Overall classification performance of different models (four-fold cross-validation, mean [min, max])
| Encoder | Method | ACC | Balanced ACC | ROC-AUC | PR-AUC | Macro-precision | Macro-F1 |
|---|---|---|---|---|---|---|---|
| ResNet50 | TransMIL | 93.6% [92.1, 95.0] | 91.6% [89.3, 93.8] | 98.4% [97.8, 99.1] | 97.4% [95.8, 98.6] | 93.2% [90.5, 95.1] | 92.4% [90.0, 94.2] |
| ResNet50 | CLAM(SB) | 92.7% [91.0, 94.1] | 91.9% [90.1, 93.5] | 95.9% [94.5, 97.2] | 94.8% [92.5, 96.5] | 91.5% [89.2, 93.6] | 91.7% [89.5, 93.4] |
| ResNet50 | CLAM(MB) | 94.5% [92.6, 96.3] | 93.5% [91.2, 95.1] | 97.7% [96.0, 98.8] | 96.5% [94.5, 98.0] | 94.1% [91.8, 96.0] | 93.8% [91.5, 95.5] |
| ViT | TransMIL | 90.9% [88.5, 92.8] | 89.9% [87.5, 92.1] | 97.3% [95.5, 98.5] | 95.8% [93.2, 97.4] | 90.2% [87.9, 92.4] | 90.0% [87.5, 92.2] |
| ViT | CLAM(SB) | 87.3% [85.0, 89.5] | 88.1% [85.8, 90.4] | 96.3% [94.0, 97.8] | 94.2% [91.5, 96.2] | 87.5% [85.1, 89.7] | 87.8% [85.4, 90.0] |
| ViT | CLAM(MB) | 91.5% [89.2, 93.4] | 90.9% [88.5, 93.0] | 97.4% [95.8, 98.6] | 96.0% [93.5, 97.8] | 91.1% [88.5, 93.3] | 91.0% [88.5, 93.1] |
Table 2.
Per-class recall rates across four folds (mean [min, max])
| Encoder | Method | Cutaneous vasculitis | Spongiotic dermatitis | Granulomatous inflammation | Panniculitis |
|---|---|---|---|---|---|
| ResNet50 | TransMIL | 82.0% [78.5, 85.2] | 98.3% [96.1, 100.0] | 98.3% [96.5, 100.0] | 97.8% [95.4, 99.5] |
| ResNet50 | CLAM-SB | 80.9% [77.2, 84.1] | 97.8% [95.5, 99.1] | 99.4% [97.3, 100.0] | 89.3% [86.1, 92.8] |
| ResNet50 | CLAM-MB | 84.9% [81.8, 87.5] | 99.4% [98.0, 100.0] | 96.2% [94.5, 97.9] | 93.6% [90.5, 96.1] |
| ViT | TransMIL | 79.8% [76.5, 82.9] | 95.1% [93.0, 97.3] | 97.3% [95.0, 99.1] | 87.2% [84.1, 89.8] |
| ViT | CLAM-SB | 75.6% [72.3, 78.8] | 92.9% [90.6, 94.8] | 96.7% [94.9, 98.3] | 87.2% [84.5, 89.6] |
| ViT | CLAM-MB | 77.7% [74.5, 80.8] | 96.7% [94.5, 98.4] | 97.8% [95.9, 99.2] | 91.4% [88.8, 93.8] |
Holistically, the TransMIL demonstrated superior performance across both feature extraction architectures, particularly excelling in the critical metrics of ROC-AUC and specificity. While the CLAM(MB) algorithm outperformed CLAM(SB) in the ResNet50 architecture, its performance was suboptimal in the ViT implementation. These findings provide valuable insights for algorithm selection in medical image classification tasks.
To elucidate the decision-making process of our deep learning framework and contextualize the variations in classification performance, we extracted and visualized the spatial attention weights generated by the TransMIL network across the four disease categories (Fig. 5). The heatmaps demonstrate that the model successfully localizes highly predictive regions, though its attention distribution patterns vary significantly depending on the intrinsic morphological characteristics of each disease.
Fig. 5.
Representative whole slide images (WSIs) and corresponding deep learning attention heatmaps. (Top row) Original H&E-stained WSIs of cutaneous vasculitis, spongiotic dermatitis, granulomatous inflammation, and panniculitis. (Bottom row) Corresponding spatial attention maps generated by the TransMIL network. The color overlay represents the attention weights allocated by the model, transitioning from blue (low diagnostic relevance/background) to red (high diagnostic relevance/highly predictive regions).
For Spongiotic Dermatitis and Panniculitis, which are characterized by relatively diffuse, spatially contiguous pathological alterations (e.g., widespread epidermal spongiosis and extensive inflammatory infiltration in subcutaneous adipose tissue), the model consistently assigned concentrated, high-attention weights (indicated by prominent red regions) to these hallmark diagnostic areas. Similarly, in Granulomatous Inflammation, the model accurately highlighted distinct granulomatous nodules. This robust spatial correlation directly aligns with the excellent recall rates (> 97%) observed in these three categories.
Conversely, the attention distribution for Cutaneous Vasculitis (CV) exhibited a noticeably different pattern. CV lesions are typically highly focal and spatially sparse, primarily defined by subtle microvascular fibrinoid necrosis. As visualized in the CV attention map, while the model identified areas of inflammation, the high-attention weights were frequently dispersed across dense, non-specific perivascular inflammatory infiltrates rather than being exclusively pinpointed on the localized vascular disruptions. This objective visualization reveals the inherent difficulty the model encounters when aggregating sparse, micro-focal features within gigapixel images, thereby explaining the relatively lower recall rate (82.0%) recorded for CV in our quantitative evaluation.
Comparison of diagnostic accuracy between AI model and pathologists
To compare the diagnostic performance of the model with that of clinicians, we recruited 12 independent pathologists for this study, including 4 associate chief physicians, 4 attending physicians, and 4 resident physicians. The evaluation was conducted on an independent held-out test set comprising 299 WSIs, which was strictly separated from the training data. To ensure a fair and direct comparison with the AI model, the pathologists independently reviewed the histopathological WSIs without access to clinical background information or serological data, such as ANCA.
The associate chief physicians demonstrated the highest diagnostic accuracy, with the top score reaching 100%. Their accuracy consistently remained at a high level, with multiple test results reaching or exceeding 95%. This indicates that the group of physicians with the most extensive clinical experience and the highest professional proficiency possesses exceptional diagnostic capabilities. Their outstanding performance underscores the significant value of profound clinical experience and specialized knowledge in achieving precise diagnoses. The attending physicians exhibited a broader range of accuracy rates, spanning from 74.6% to 98.5%. This variability suggests that while attending physicians have substantial clinical experience, their diagnostic accuracy shows greater fluctuation compared to the consistently excellent performance of the associate chief physician group. This may be attributed to the combined effects of factors such as differences in subspecialty focus and individual capabilities within this group. The resident physicians, who are in the early stages of their careers, had the lowest accuracy rates, ranging from 52.1% to 72.7%. This aligns with the developmental trajectory of physicians at this stage, as they are still accumulating clinical experience and professional knowledge. The distribution of accuracy rates in this group clearly reflects the learning curve characteristics and developmental potential typical of the early phases of a medical career.
As illustrated in Fig. 6, the test accuracy of the model in this study achieved a diagnostic level comparable to that of the associate chief physicians. This finding not only validates the model’s effectiveness in distinguishing cutaneous vasculitis (CV) but, more importantly, reveals its potential as a clinical auxiliary diagnostic tool for pathologists. The model promises to provide intelligent support for the pathological diagnostic process, enhancing its efficiency and precision.
Fig. 6.

Comparison of AI and physicians with varying levels of experience in test accuracy.
This section presents a comparison of artificial intelligence (AI) and physicians with different levels of experience in terms of test accuracy.Boxes of different colors represent the distribution of test accuracy rates at each experience level.The purple dashed line, labeled “Our Model,” indicates the performance of our model in terms of test accuracy, achieving a rate of 98.3%. One-sample t-test was performed to evaluate the statistical significance of the accuracy differences between the AI model and each physician group (*p < 0.05; **p < 0.01; ***p < 0.001).
Discussion
A critical challenge in the evaluation of CV is its significant pathological overlap with granulomatous diseases and panniculitis. For instance, GPA can initially present with cutaneous necrotizing vasculitis, mirroring CV. However, GPA is typified by the presence of extravascular granulomatous inflammation and a high positivity rate for PR3-ANCA, which eventually leads to systemic involvement. Similarly, erythema induratum (EI) often presents with vasculitis of the medium-sized vessels in the subcutis, but it is fundamentally a lobular panniculitis associated with fat necrosis, often linked to tuberculosis hypersensitivity.
In this study, we explicitly addressed these overlaps to avoid misclassification. By integrating detailed histopathological phenotyping (e.g., differentiating pure leukocytoclastic from necrotizing or granulomatous patterns) with comprehensive IHC, mandatory ANCA profiling, and extended clinical follow-up, we ensured that mimickers like GPA and EI were systematically excluded. This stringent, multimodal diagnostic approach strengthens the homogeneity of our CV cohort and underscores the necessity of moving beyond simple histology to include immunopathologic and longitudinal clinical data in dermatological research.
In this study, by comparing the advanced convolutional neural networks such as ResNet50 and ViT, a model for the differentiation of cutaneous vasculitis was successfully constructed and verified. This method has significantly enhanced the robustness and accuracy of the model, with the Area Under the Curve (AUC) reaching 98.39%, and it has demonstrated excellent precision, recall, and F1 scores in the classification of multiple diseases. This indicates that the model has great potential as a reliable diagnostic assistance tool.
Despite the promising performance achieved by our weakly-supervised framework, this study has several key limitations that must be acknowledged and addressed in future research.
First, regarding the granularity of disease classification, our model primarily focuses on distinguishing cutaneous vasculitis from broad categories such as edematous dermatitis, granulomatous inflammation, and panniculitis. In real-world clinical pathology, one of the most significant challenges is differentiating true vasculitis (characterized by vascular wall destruction and fibrinoid necrosis) from mere perivascular inflammation (perivasculitis), which is a non-specific finding in many inflammatory dermatoses. Furthermore, the current model lacks the capability to further stratify cutaneous vasculitis into its specific subtypes (e.g., leukocytoclastic vasculitis, IgA vasculitis, microscopic polyangiitis, or macroscopic polyarteritis nodosa). Since different subtypes entail distinct systemic implications and require completely different treatment strategies, developing a fine-grained subtyping model is a critical next step.
Second, although our dataset is relatively large for computational pathology (1196 WSIs from two centers), the robustness and generalizability of the model require further validation. Deep learning models are inherently susceptible to domain shifts caused by variations in tissue preparation, H&E staining protocols (e.g., color intensity and contrast), and different digital scanner characteristics across different institutions. To ensure the model’s reliability in a real-world clinical setting, future studies must incorporate larger, multi-center, and international cohorts. Including more “edge cases” and WSIs with common physical artifacts (such as tissue folds, bubbles, or poor staining) will be essential to thoroughly evaluate and improve the model’s robustness.
Third, the “black-box” nature of deep learning remains a hurdle for clinical adoption. Although our Multiple Instance Learning (MIL) framework can highlight highly suspicious regions using attention weights, its explainability is still limited. Pathologists diagnose vasculitis by identifying specific morphological features such as endothelial swelling, nuclear dust (karyorrhexis), erythrocyte extravasation, and inflammatory cell typologies (neutrophils vs. eosinophils vs. lymphocytes). Future research should focus on interpretable AI architectures that can explicitly recognize and output these specific histopathological features, thereby building greater trust among medical professionals.
Finally, the definitive diagnosis of cutaneous vasculitis often cannot rely solely on H&E-stained slides. The 2012 Chapel Hill Consensus Conference emphasizes the integration of clinical history, direct immunofluorescence (DIF), and serological tests (such as ANCA). A highly meaningful future direction would be the development of a multi-modal AI decision-support system that integrates WSI pixel data with patient electronic health records (EHR), laboratory test results, and DIF imaging.
It is noteworthy that despite Cutaneous Vasculitis (CV) comprising the largest proportion of our test set (95 out of 299 samples, compared to 71 Edematous Dermatitis [ED], 71 Granulomatous Inflammation, and 62 Panniculitis), it paradoxically yielded the lowest recall (82.0%). This observation indicates that the performance bottleneck is not driven by classical data scarcity or class imbalance, but rather by the inherent morphological heterogeneity and spatial sparsity of CV lesions. Pathologically, CV encompasses a diverse spectrum of vascular injuries—ranging from acute leukocytoclastic patterns with prominent nuclear dust to chronic stages dominated by lymphocytic infiltration9. Furthermore, the hallmark diagnostic features of CV, such as focal fibrinoid necrosis of small vessel walls, are typically highly localized. In contrast, ED generally presents with diffuse and globally distributed alterations (e.g., widespread epidermal spongiosis), which are more readily aggregated by the global pooling strategies of Multiple Instance Learning (MIL) models.
Recent advancements in computational pathology emphasize that attention-based MIL models frequently encounter “attention instability” or bias when tasked with identifying sparse, highly localized diagnostic features within gigapixel heterogeneous images33,34. To contextualize this limitation in our study, a qualitative analysis of the model’s attention maps on misclassified CV cases was performed. The attention maps revealed that the network occasionally assigned disproportionately high attention weights to dense, non-specific perivascular inflammatory infiltrates, while overlooking subtle focal areas of vascular wall disruption. This model bias toward prominent but diagnostically secondary inflammatory patterns, alongside minor annotation challenges inherent to differentiating secondary vasculitic changes in other dermatoses, explains the diminished recall. Consequently, the model’s robust overall classification performance may, in part, reflect its proficiency in recognizing and differentiating these broader, overlapping inflammatory background patterns (such as diffuse epidermal changes or specific inflammatory infiltrates) rather than the direct identification of primary vasculitic vessel injury, which remains a subtle and highly localized feature. Future iterations of this diagnostic model could benefit from incorporating prototype-guided attention mechanisms or explicitly annotating local vascular regions in a subset of the training data to enhance sensitivity toward highly localized and heterogeneous diseases like CV.
In conclusion, this study has not only promoted the progress of artificial intelligence in the medical field but also may accelerate the speed of disease diagnosis, improve its accuracy, and enhance the efficiency of medical services. As AI technologies are gradually integrated into the clinical workflow, they will provide medical professionals with timely, reliable, and easily accessible diagnostic information. By addressing the current limitations and moving toward multi-modal, interpretable systems, AI will undoubtedly play a pivotal role in improving patients’ treatment outcomes and the overall quality of dermatopathology services.
Acknowledgements
The authors would like to thank Prof. Ruiqun Qi and Prof. Xiaoyu Cui for their valuable support and assistance during the course of this research.
Author contributions
D.L. and Y.G. conceived and designed the study. J.H., C.S., A.G., P.C. and W.Q. collected the data. D.L., Y.G. and B.L. performed the data analysis. L.Z. drafted the manuscript. All authors read and approved the final manuscript.
Funding
8. This study was supported by National Natural Science Foundation of China under Grant Number [NSFC 82305259] and Tianjin Health Research Project under Grant Number [No.TJWJ2024QN070]. The funding body had no role in the design of the study, data collection, analysis, interpretation of data, or in writing the manuscript.
Data availability
The datasets generated and analyzed during the current study are available from the corresponding author on reasonable request.
Declarations
Ethics approval and consent to participate
Ethics approval for this study was obtained from The First Hospital of China Medical University and Tianjin Academy of Traditional Chinese Medicine Affiliated Hospital Ethics Committee (Approval Number: [2020-196-2]). Written informed consent was obtained from all individual participants included in the study.
Consent for publication
All participants provided written consent for the publication of anonymized data and findings.
Competing interests
The authors declare no competing interests.
Footnotes
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Ding Luo, Yaoxing Guo and Bingrun Li contributed equally to this work.
References
- 1.Shavit, E., Alavi, A. & Gary Sibbald, R. Cutaneous Vasculitis—what do we have to know? A review of literature. Int. J. Low. Extrem. Wounds. 17 (4), 218–226 (2018). [DOI] [PubMed] [Google Scholar]
- 2.Carlson, J., Andrew, B. T., Ng & Ko-Ron, C. Cutaneous Vasculitis update: diagnostic criteria, classification, epidemiology, etiology, pathogenesis, evaluation and prognosis. Am. J. Dermatopathol.27 (6), 504–528 (2005). [DOI] [PubMed] [Google Scholar]
- 3.Jennette, J. C. Overview of the 2012 revised International Chapel Hill Consensus Conference nomenclature of vasculitis. Clin. Exp. Nephrol.17, 603–606 (2013). [DOI] [PMC free article] [PubMed]
- 4.Gribbons, K. et al. Patterns of arterial disease in Takayasu arteritis and giant cell arteritis. Arthritis Care Res.72 (11), 1615–1624 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Mohankumar, S. et al. Kawasaki disease or polyarteritis nodosa: coronary involvement, a diagnostic conundrum. Rheumatol. Int.43 (12), 2327–2331 (2023). [DOI] [PubMed] [Google Scholar]
- 6.Cunningham-Rundles, C. Physiology of IgA and IgA deficiency. J. Clin. Immunol.21, 303–309 (2001). [DOI] [PubMed] [Google Scholar]
- 7.Chen, K. R. & Andrew Carlson, J. Clinical approach to cutaneous Vasculitis. Am. J. Clin. Dermatol.9, 71–92 (2008). [DOI] [PubMed] [Google Scholar]
- 8.Xu, L. Y., Esparza, E. M., Anadkat, M. J., Crone, K. G. & Brasington, R. D. Cutaneous manifestations of vasculitis. Semin. Arthritis Rheum.38 (5), 348–360 (2009). [DOI] [PubMed] [Google Scholar]
- 9.Marvisi, C. et al. What to know about biopsy sampling and pathology in Cutaneous Vasculitis? Curr. Rheumatol. Rep.24 (9), 279–291 (2022). [DOI] [PubMed] [Google Scholar]
- 10.Kitching, A. et al. ANCA-associated cutaneous vasculitis. Nat. Rev. Dis. Primers. 6 (1), 71 (2020). [DOI] [PubMed] [Google Scholar]
- 11.Kallenberg, C. G. M. Pathogenesis of ANCA-associated vasculitis. Ann. Rheum. Dis.70(Suppl 1), i59–i63 (2011). [DOI] [PubMed]
- 12.Carlson, J. A. The histological assessment of cutaneous vasculitis. Histopathology56 (1), 3–23 (2010). [DOI] [PubMed] [Google Scholar]
- 13.Ozaki, S. et al. Granulocyte colony-stimulating factor‐induced granulomatous dermatitis with enlarged histiocytes clinically manifesting as painful edematous nodules with high fever similar to Sweet’s syndrome. J. Dermatol.42 (4), 414–417 (2015). [DOI] [PubMed] [Google Scholar]
- 14.Shah, K. K., Bobbi, S., Pritt & Mariam, P. Histopathologic review of granulomatous inflammation. J. Clin. Tuberculosis Mycobact. Dis.7, 1–12 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 15.Ter Poorten, Maryanna, C. & Bruce, H. Thiers. "Panniculitis." Dermatol. Clin.20(3), 421–433 (2002). [DOI] [PubMed]
- 16.LeCun, Y., Bengio, Y. & Hinton, G. Deep learning. Nature. 521(7553), 436–444 (2015). [DOI] [PubMed]
- 17.Altaf, F. et al. Going deep in medical image analysis: concepts, methods, challenges, and future directions. IEEE Access.7, 99540–99572 (2019). [Google Scholar]
- 18.Munir, K. et al. Cancer diagnosis using deep learning: a bibliographic review. Cancers. 11(9), 1235 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 19.Fitzgerald, R. C. et al. The future of early cancer detection. Nat. Med.28 (4), 666–677 (2022). [DOI] [PubMed] [Google Scholar]
- 20.Razzak, M., Imran, S., Naz & Zaib, A. Deep learning for medical image processing: Overview, challenges and the future. In Classification in BioApps: Automation of Decision Making, 323–350 (2018).
- 21.Manhas, J., Gupta, R. K. & Roy, P. P. A review on automated cancer detection in medical images using machine learning and deep learning based computational techniques: Challenges and opportunities. Arch. Comput. Methods Eng.29 (5), 2893–2933 (2022). [Google Scholar]
- 22.Pustejovsky, J. & Stubbs, A. Natural Language Annotation for Machine Learning: A Guide to Corpus-Building for Applications (O’Reilly Media, Inc., 2012).
- 23.Brixtel, R. et al. Whole slide image quality in digital pathology: review and perspectives. IEEE Access.10, 131005–131035 (2022). [Google Scholar]
- 24.Zhou, Z. H. A brief introduction to weakly supervised learning. Natl. Sci. Rev.5 (1), 44–53 (2018). [Google Scholar]
- 25.Campanella, G. et al. Clinical-grade computational pathology using weakly supervised deep learning on whole slide images. Nat. Med.25 (8), 1301–1309 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 26.Vaswani, A. Attention is all you need. Adv. Neural. Inf. Process. Syst. (2017).
- 27.Shao, Z. et al. Transmil: Transformer based correlated multiple instance learning for whole slide image classification. Adv. Neural. Inf. Process. Syst.34, 2136–2147 (2021). [Google Scholar]
- 28.Li, Z. et al. A survey of convolutional neural networks: analysis, applications, and prospects. IEEE Trans. Neural Netw. Learn. Syst.33 (12), 6999–7019 (2021). [DOI] [PubMed] [Google Scholar]
- 29.Han, K. et al. A survey on vision transformer. IEEE Trans. Pattern Anal. Mach. Intell.45 (1), 87–110 (2022). [DOI] [PubMed] [Google Scholar]
- 30.Koonce, B. & Koonce, B. ResNet 50. Convolutional neural networks with swift for tensorflow: image recognition and dataset categorization, 63–72 (2021).
- 31.He, K. et al. Deep residual learning for image recognition. In 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 770–778 (2015).
- 32.Liu, L. et al. On the variance of the adaptive learning rate and beyond. 10.48550/arXiv.1908.03265 (2019).
- 33.Lu, M. Y. et al. Data-efficient and weakly supervised computational pathology on whole-slide images. Nat. Biomed. Eng.5 (6), 555–570 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 34.Shafi, S. & Parwani, A. V. Artificial intelligence in diagnostic pathology. Diagn. Pathol.18, 109 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
The datasets generated and analyzed during the current study are available from the corresponding author on reasonable request.





