Artificial intelligence-assisted identification of skin lesions associated with chronic venous insufficiency Authors: Ko Eun Kim, Jin Cheol Na, SangJun Song, Jiehyun Jeon, Seungjun Baek, Beom Suk Kim Published: 2027 ABSTRACT ObjectiveThis study aimed to develop and validate a deep learning framework to classify chronic venous insufficiency (CVI)-related skin lesions and differentiate them from other lower-extremity dermatological conditions using dermoscopic images.MethodsWe retrospectively analyzed 677 high-resolution dermoscopic images from 248 patients, all histopathologically confirmed by skin biopsy. The dataset was categorized into three clinically distinct groups: (1) skin conditions related to CVI (eg, stasis dermatitis), (2) common inflammatory dermatological diseases, and (3) vasculitis. A Swin Transformer (Microsoft Research)-based architecture—a deep learning model that processes images at multiple spatial scales to capture both fine local detail and broader contextual patterns—was implemented to analyze dermoscopic images. A strict patient-level split was used to ensure model robustness, so that images from the same patient were never shared between training and test sets, which could otherwise artificially inflate performance estimates.ResultsThe proposed Swin Transformer model demonstrated superior diagnostic performance, achieving an overall area under the curve of 0.935 and classification accuracy of 0.848, significantly outperforming conventional convolutional neural networks and Vision Transformer baseline models. Group-specific area under the curve values were 0.942 for CVI-related conditions, 0.929 for inflammatory dermatoses, and 0.934 for vasculitis. Misclassifications were predominantly associated with overlapping dermoscopic features, such as purpuric patterns shared between stasis dermatitis and early-stage vasculitis. Notably, misclassification errors were directed more often toward the lower-risk pathway, with three CVI-related lesions misread as vasculitis, compared with only one vasculitis case misread as a CVI-related lesion.ConclusionsThis study demonstrates that a Swin Transformer-based deep learning model can effectively differentiate CVI-related skin lesions from inflammatory and vascular conditions, providing objective, noninvasive diagnostic support with the potential to streamline clinical workflows, facilitate early referrals to specialized care, and reduce reliance on invasive diagnostic procedures in the management of lower-extremity skin diseases. Article Highlights •Type of Research: Retrospective cohort study•Key Findings: A Swin Transformer-based deep learning framework achieved an overall area under the curve of 0.935 and an accuracy of 0.848 when differentiating chronic venous insufficiency-related skin lesions from inflammatory dermatoses and vasculitis using dermoscopic images.•Take-Home Message: Advanced deep learning architectures can provide highly accurate, noninvasive diagnostic support for lower-extremity skin diseases, potentially streamlining clinical workflows and reducing unnecessary skin biopsies. Article Highlights •Type of Research: Retrospective cohort study•Key Findings: A Swin Transformer-based deep learning framework achieved an overall area under the curve of 0.935 and an accuracy of 0.848 when differentiating chronic venous insufficiency-related skin lesions from inflammatory dermatoses and vasculitis using dermoscopic images.•Take-Home Message: Advanced deep learning architectures can provide highly accurate, noninvasive diagnostic support for lower-extremity skin diseases, potentially streamlining clinical workflows and reducing unnecessary skin biopsies. •Type of Research: Retrospective cohort study Type of Research: Retrospective cohort study •Key Findings: A Swin Transformer-based deep learning framework achieved an overall area under the curve of 0.935 and an accuracy of 0.848 when differentiating chronic venous insufficiency-related skin lesions from inflammatory dermatoses and vasculitis using dermoscopic images. Key Findings: A Swin Transformer-based deep learning framework achieved an overall area under the curve of 0.935 and an accuracy of 0.848 when differentiating chronic venous insufficiency-related skin lesions from inflammatory dermatoses and vasculitis using dermoscopic images. •Take-Home Message: Advanced deep learning architectures can provide highly accurate, noninvasive diagnostic support for lower-extremity skin diseases, potentially streamlining clinical workflows and reducing unnecessary skin biopsies. Take-Home Message: Advanced deep learning architectures can provide highly accurate, noninvasive diagnostic support for lower-extremity skin diseases, potentially streamlining clinical workflows and reducing unnecessary skin biopsies. Chronic venous disease (CVD) is a common yet frequently under-recognized condition, and reported prevalence estimates for varicose veins vary widely across populations, ranging from approximately 2% to 56% in men and 1% to 60% in women and increasing with age.1, 2, 3 Caused by structural and/or functional venous abnormalities, CVD presents with various lower-extremity symptoms including cramps, heaviness, edema, and pain,4 and is associated with a broad spectrum of skin manifestations ranging from pigmentation and eczema to lipodermatosclerosis and venous ulceration—changes that can closely mimic other dermatological or systemic inflammatory conditions.5,6 The Clinical-Etiology-Anatomy-Pathophysiology (CEAP) classification categorizes CVD based on clinical presentation, etiology, anatomy, and pathophysiology.7 The clinical component (C-class) ranges from C0 to C6 (Supplementary Table I, online only); classes C3 and above are referred to as chronic venous insufficiency (CVI), with C4 and higher characterized by skin and subcutaneous tissue changes including pigmentation or eczema (C4a), lipodermatosclerosis or atrophie blanche (C4b), corona phlebectatica (C4c), healed venous ulcer (C5), and active venous ulcer (C6).6,8 Accurate identification of skin lesion etiology is essential, as treatment strategy varies accordingly.8 For the vascular specialist, this distinction is clinically consequential: skin changes that are venous in origin (CEAP C4-C6) may improve with compression therapy or correction of superficial venous reflux, whereas inflammatory or vasculitic lesions require dermatologic or rheumatologic management, so that misattribution risks either unnecessary venous procedures or delayed systemic treatment. Stasis dermatitis may resemble allergic or eczematous conditions, whereas pigmentation, atrophie blanche, and lipodermatosclerosis may be confused with vasculitis or autoimmune panniculitis, often requiring clinician expertise to distinguish. Skin biopsy, the diagnostic gold standard, is not routinely performed because of its invasive nature and patient discomfort. Dermoscopy, also known as dermatoscopy or epiluminescence microscopy, uses 10 to 20 times magnification with polarized and nonpolarized illumination to eliminate surface reflection, revealing subsurface vascular and pigmented structures invisible to the naked eye.9 This markedly improves diagnostic accuracy for melanocytic lesions over unaided examination,9,10 with established vascular pattern classifications aiding differentiation of inflammatory and vascular dermatoses.11,12 Accordingly, dermatologists widely use dermoscopy not only as a diagnostic adjunct but as a prebiopsy screening tool, reducing unnecessary excisions.13 Its low cost, portability, and short learning curve have also enabled adoption by nondermatologist clinicians, improving skin lesion triage accuracy outside specialist dermatology settings.14 Deep learning-based approaches using dermoscopic or clinical images, therefore, represent a promising avenue for more objective classification of CVI-associated skin lesions. Convolutional neural networks (CNNs) are among the most widely used architectures for dermatological classification,15 applied to conditions including melanoma, psoriasis, acne, and rosacea.16,17 More recently, transformer-based models have demonstrated superior capability in capturing complex spatial features in medical imaging,18, 19, 20 making them particularly suited to the intricate visual patterns of dermoscopic images. This study aimed to evaluate the utility of a transformer-based deep learning model for classifying CVI-associated skin lesions in dermoscopic images, using only biopsy-confirmed cases to ensure diagnostic reliability. Methods Ethical approval This study was performed in accordance with the principles of the Declaration of Helsinki. Approval was granted by the Medical Ethics Committee of Korea University Guro Hospital (Institutional Review Board No. 2025GR0073). As the study was retrospective in design and used anonymized dermoscopic images obtained for clinical purposes, the requirement for informed patient consent was waived by the Medical Ethics Committee. Dataset overview Dermoscopic images were retrospectively collected from the imaging database of the Department of Dermatology at Korea University Guro Hospital between January 2017 and December 2024. A total of 248 patients were included, and the dataset comprised only cases in which diagnoses were confirmed through skin biopsy and pathological review. The cohort comprised 109 male and 139 female patients, with sex ascertained from electronic medical records. Each patient contributed two to five dermoscopic images, capturing lesions at various anatomical locations and reflecting natural intrapatient variability. All images were acquired by board-certified dermatologists using a digital dermoscopic system (DermLite, 3Gen) connected to a digital camera (Canon EOS 90D). Patients were randomly allocated to training and test sets at an approximate ratio of 4:1. In the training set, multiple dermoscopic images from the same patient were intentionally retained to capture intrapatient variability. In contrast, the test set included only one image per patient, ensuring strict case-level independence and eliminating the possibility of overlapping patient information between sets. For the final classification task, the dataset was organized into three clinically meaningful groups on the basis of disease etiology and expected management pathways. Group A comprised CVI-related skin conditions, including pigmented purpuric dermatosis (PPD) and stasis dermatitis, both corresponding to CEAP class C4a. Group B included inflammatory dermatological diseases unrelated to venous pathology, specifically psoriasis and allergic dermatitis (such as atopic and contact dermatitis). Group C comprised vasculitis, which typically requires additional systemic and rheumatological evaluation beyond dermatological or venous intervention. This grouping strategy was adopted to reflect real-world clinical decision-making, in which an initial distinction between venous-related disease, primary dermatological conditions, and systemic inflammatory disorders is critical for appropriate referral and management. Stasis dermatitis is a well-recognized eczematous skin condition associated with CEAP class C4 CVD (Fig 1, A and B). Histopathologically, it is characterized by dilated capillaries, extravasated erythrocytes, hemosiderin deposition, and superficial perivascular lymphocytic inflammation.21 PPD is a chronic disorder characterized by pigmented macules, petechiae, and purpuric patches (Fig 1, C and D). Although PPD shares histopathological features with stasis dermatitis, capillary dilatation is less prominent. Most cases are localized to the lower legs, though severe cases may demonstrate widespread distribution. In a subset of patients, PPD may be attributable to underlying systemic conditions or medications, including diabetes mellitus, dyslipidemia, autoimmune disease, nonsteroidal anti-inflammatory drugs, or oral antibiotics.22 Gravitational purpura, a subtype of PPD, is recognized as a clinical manifestation of CVI. Two studies have reported a high prevalence of venous reflux on duplex ultrasound study among patients with PPD, with rates of 62.5% in a Korean cohort and 75% in a Turkish cohort, supporting the association between PPD and underlying CVD.23,24 Accordingly, PPD may be considered a dermatological manifestation of CVI and classified within the pigmentation and eczema category (CEAP class C4a). To restrict inclusion to CVI-related PPD cases, patients were excluded when lesions appeared outside the lower extremities or when causative drugs or underlying systemic diseases were identified in electronic medical records. In total, 78 patients (37 males, 41 females; mean age, 58.9 ± 12.1 years) were included in group A; 286 images from 60 patients were allocated to the training set, and 18 patients each contributed one image to the test set (Supplementary Table II, online only).Fig 1Representative clinical and dermoscopic images of the five disease categories included in the dataset. A and B, Stasis dermatitis; C and D, pigmented purpuric dermatosis; E and F, allergic dermatitis; G and H, psoriasis; and I and J, vasculitis. For each category, the upper panel shows a representative clinical image and the lower panel shows the corresponding dermoscopic image obtained from the same patient. All images were acquired before skin biopsy. Representative clinical and dermoscopic images of the five disease categories included in the dataset. A and B, Stasis dermatitis; C and D, pigmented purpuric dermatosis; E and F, allergic dermatitis; G and H, psoriasis; and I and J, vasculitis. For each category, the upper panel shows a representative clinical image and the lower panel shows the corresponding dermoscopic image obtained from the same patient. All images were acquired before skin biopsy. The remaining patients presented with lower-extremity skin lesions unrelated to CVI. Group B consisted of psoriasis and allergic dermatitis, representing primary inflammatory dermatological conditions (Fig 1, E-H). A total of 70 patients (33 males, 37 females; mean age, 42.2 ± 17.2 years) were included, with 56 patients (137 images) in the training set and 14 patients contributing one image each to the test set. Group C comprised vasculitis, which requires systemic evaluation and, in some cases, referral to internal medicine (Fig 1, I and J). A total of 100 patients (39 males, 61 females; mean age, 61.4 ± 16.6 years) were included, with 73 patients (195 images) in the training set and 27 patients in the test set. In total, 677 images from 248 patients were included in the study. The distribution of images and patients across groups and training-test allocations is detailed in Supplementary Table II (online only). Deep learning model architecture We used the Swin Transformer (Microsoft Research) as the backbone of our deep learning model, given its superior performance in high-resolution image analysis.25 In brief, this architecture analyzes an image at multiple levels of detail simultaneously—conceptually similar to how a clinician first inspects a lesion closely for fine local features and then steps back to assess its overall distribution and pattern—allowing the model to integrate both fine-grained and broader contextual information from the same image. The Swin Transformer builds upon the Vision Transformer (ViT; Google Research), which processes images as sequences of patches using self-attention mechanisms.26 Compared with ViT, the Swin Transformer introduces a hierarchical structure and a shifted-window attention mechanism. An overview of the architecture is presented in Fig 2.Fig 2Overall architecture of the proposed Swin Transformer-based deep learning model for chronic venous insufficiency (CVI) classification. The model consists of two main components: a Feature Extraction layer (blue box) and a Classification layer (red box). Overall architecture of the proposed Swin Transformer-based deep learning model for chronic venous insufficiency (CVI) classification. The model consists of two main components: a Feature Extraction layer (blue box) and a Classification layer (red box). Hierarchical design and patch merging Unlike ViT, which divides images into fixed-size patches, the Swin Transformer processes input images hierarchically. Beginning with smaller patches and progressively merging them at subsequent stages, the model captures both local and global contextual information, enabling multiscale feature learning (Fig 2). Shifted window attention mechanism A key innovation of the Swin Transformer is its shifted-window self-attention mechanism. The model divides images into local windows and computes self-attention within each window. By shifting window positions across consecutive layers, the model captures cross-window dependencies at the global scale while substantially reducing computational overhead (Fig 2). Model adaptation for CVI classification The architecture was pretrained on ImageNet-21k (ImageNet project, Stanford University) and subsequently fine-tuned on ImageNet-1k at a resolution of 384 × 384 pixels.27 To leverage the generalization capability gained from large-scale pretraining, all feature extraction layers were initialized with pretrained weights and kept fixed during training. A task-specific classification layer was appended, comprising linear layers, layer normalization, and rectified linear unit 6 activation.28,29 The output of the classification layer corresponds to a predicted probability for each of the three disease groups (A, B, or C). Training and evaluation All input images were resized and centercropped to 384 × 384 × 3 pixels to ensure compatibility with the model architecture and standardize input dimensions. Focal loss was used as the loss function instead of conventional cross-entropy loss, assigning higher weights to misclassified samples to improve performance on harder-to-classify instances.30 The model was optimized using the AdamW optimizer (Loshchilov and Hutter) with a learning rate of 1 × 10−4, weight decay of 1 × 10−4, and beta parameters of (0.9, 0.98), with a batch size of 32 over 100 epochs.31 Following training, model weights were applied to the held-out test set for final performance evaluation. Results Classification model performance The performance of the proposed Swin Transformer-based model was evaluated and compared with CNN-based and ViT-based baseline architectures. CNN-based baselines included EfficientNet-B4 (Google Research) and ResNet-50 (Microsoft Research), both widely used in medical image classification,32,33 and ViT-based baselines comprised ViT-B/16 and ViT-L/16.26 Results are summarized in Table. The proposed model achieved an area under the curve (AUC) of 0.935 and an accuracy of 0.848, outperforming all baseline models. Group-specific performance metrics were as follows: for group A, precision, recall, and F1-score were 0.833, 0.833, and 0.833, respectively; for group B, precision, recall, and F1-score were 0.846, 0.786, and 0.815, respectively; and for group C, precision, recall, and F1-score were 0.857, 0.889, and 0.873, respectively. These results highlight the model’s capacity to capture discriminative features through its hierarchical design and shifted-window attention mechanism.TablePerformance comparison of different deep learning models on the classification taskModel/architectureGroup A (CVI)Group B (inflammatory)Group C (vasculitis)AUCAccuracyPrecisionRecallF1-scorePrecisionRecallF1-scorePrecisionRecallF1-scoreResNet-500.3640.6670.4710.5830.5000.5390.5710.2960.3900.6860.458EfficientNet-B40.4000.2220.2860.2500.1430.1820.4390.6670.5290.5100.407ViT-B/160.5650.7220.6340.9090.7140.8000.7600.7040.7310.8670.712ViT-L/160.8000.6670.7270.6920.6430.6670.6770.7780.7240.8780.712Swin Transformer (ours)0.8330.8330.8330.8460.7860.8150.8570.8890.8730.9350.848AUC, Area under the curve; CVI, chronic venous insufficiency; ViT, Vision Transformer.The best performance in each metric is indicated in bold. TablePerformance comparison of different deep learning models on the classification taskModel/architectureGroup A (CVI)Group B (inflammatory)Group C (vasculitis)AUCAccuracyPrecisionRecallF1-scorePrecisionRecallF1-scorePrecisionRecallF1-scoreResNet-500.3640.6670.4710.5830.5000.5390.5710.2960.3900.6860.458EfficientNet-B40.4000.2220.2860.2500.1430.1820.4390.6670.5290.5100.407ViT-B/160.5650.7220.6340.9090.7140.8000.7600.7040.7310.8670.712ViT-L/160.8000.6670.7270.6920.6430.6670.6770.7780.7240.8780.712Swin Transformer (ours)0.8330.8330.8330.8460.7860.8150.8570.8890.8730.9350.848AUC, Area under the curve; CVI, chronic venous insufficiency; ViT, Vision Transformer.The best performance in each metric is indicated in bold. Performance comparison of different deep learning models on the classification task AUC, Area under the curve; CVI, chronic venous insufficiency; ViT, Vision Transformer. The best performance in each metric is indicated in bold. Statistical significance was assessed using McNemar test (Supplementary Table III, online only), a paired test suited for comparing two classifiers evaluated on the same set of test images. It directly compares how often each model’s predictions were correct or incorrect on identical cases rather than treating the two models’ results as independent samples. The proposed model demonstrated statistically significant improvements in classification performance across all baseline architectures (P < .05). Specifically, significant improvements were observed over CNN-based models (ResNet-50 and EfficientNet-B4; P < .001) and ViT-based models (ViT-B/16 and ViT-L/16; P = .027). Confusion matrix and ROC curve analysis Confusion matrix and receiver-operating characteristic (ROC) curves are presented in Figs 3 and 4, respectively, to visualize classification performance. The confusion matrix (Fig 3) demonstrates the model’s ability to distinguish among CVI-related lesions (group A), inflammatory dermatoses (group B), and vasculitis (group C). The model correctly classified 15 samples as group A, 11 as group B, and 24 as group C, with a total of nine misclassifications across all groups. ROC curve analysis (Fig 4) confirmed robust diagnostic performance, yielding AUC values of 0.942 for group A, 0.929 for group B, and 0.934 for group C.Fig 3Confusion matrix of the classification results produced by the proposed Swin Transformer-based model. The matrix illustrates classification performance across group A [chronic venous insufficiency (CVI)-related lesions], group B (inflammatory dermatological diseases), and group C (vasculitis), with true labels on the y-axis and predicted labels on the x-axis.Fig 4Receiver-operating characteristic (ROC) curves for the three-class classification task. The curves illustrate the diagnostic performance of the proposed Swin Transformer-based model in distinguishing among chronic venous insufficiency (CVI)-related skin lesions (group A), inflammatory dermatological diseases (group B), and vasculitis (group C). The model achieved area under the curve (AUC) values of 0.942, 0.929, and 0.934 for groups A, B, and C, respectively, demonstrating robust classification performance across all categories. Confusion matrix of the classification results produced by the proposed Swin Transformer-based model. The matrix illustrates classification performance across group A [chronic venous insufficiency (CVI)-related lesions], group B (inflammatory dermatological diseases), and group C (vasculitis), with true labels on the y-axis and predicted labels on the x-axis. Receiver-operating characteristic (ROC) curves for the three-class classification task. The curves illustrate the diagnostic performance of the proposed Swin Transformer-based model in distinguishing among chronic venous insufficiency (CVI)-related skin lesions (group A), inflammatory dermatological diseases (group B), and vasculitis (group C). The model achieved area under the curve (AUC) values of 0.942, 0.929, and 0.934 for groups A, B, and C, respectively, demonstrating robust classification performance across all categories. Misclassified case analysis Nine misclassified cases were identified across the three groups (Fig 3). Among group A cases, three were misclassified as group C. Among group B cases, two were misclassified as group A and one as group C. Among group C cases, one was misclassified as group A and two as group B. Misclassifications predominantly occurred between clinically overlapping categories; representative examples are illustrated in Fig 5 and discussed in detail in the Discussion section further.Fig 5Representative examples of misclassified dermoscopic images. A, A biopsy-proven pigmented purpuric dermatosis (PPD) case misclassified as vasculitis (group C). B, A vasculitis case (group C) misclassified as a chronic venous insufficiency (CVI)-related skin lesion (group A). C, A psoriasis case (group B) misclassified as a CVI-related skin lesion (group A). D, A vasculitis case (group C) misclassified as an inflammatory dermatological disease (group B), in which a hemorrhagic crust dominated the dermoscopic image. Representative examples of misclassified dermoscopic images. A, A biopsy-proven pigmented purpuric dermatosis (PPD) case misclassified as vasculitis (group C). B, A vasculitis case (group C) misclassified as a chronic venous insufficiency (CVI)-related skin lesion (group A). C, A psoriasis case (group B) misclassified as a CVI-related skin lesion (group A). D, A vasculitis case (group C) misclassified as an inflammatory dermatological disease (group B), in which a hemorrhagic crust dominated the dermoscopic image. Discussion CVD encompasses a wide spectrum of skin manifestations that frequently pose diagnostic challenges, delay appropriate management, and contribute to socioeconomic burden.3,34 It is associated with lower-extremity skin lesions that can be difficult to differentiate from other dermatological or systemic inflammatory disorders in routine clinical practice. Although pathological examination remains the diagnostic gold standard in equivocal cases, skin biopsy is invasive, causes patient discomfort, and is not readily accessible in many primary care settings. Furthermore, biopsy of the lower extremities carries an elevated risk of complications, particularly in patients with impaired venous circulation. The proposed Swin Transformer-based model demonstrated robust classification performance. It achieved the highest AUC (0.935), significantly outperforming baseline architectures, including ViT-L/16 (AUC, 0.878), ViT-B/16 (AUC, 0.867), ResNet-50 (AUC, 0.686), and EfficientNet-B4 (AUC, 0.510; Table). Confusion matrix analysis further confirmed that only nine of 59 test samples were misclassified, underscoring the overall robustness of the model. This level of diagnostic accuracy suggests that the model could function as a clinically meaningful triage tool: by reliably distinguishing CVI-related lesions from inflammatory dermatoses (group B) or vasculitis (group C) that warrant dermatologic or rheumatologic referral, it may help vascular specialists avoid unnecessary venous procedures and direct patients to the appropriate specialty in a timely manner. Even after duplex ultrasound study confirms venous reflux, attributing a given skin finding to CVI is not always straightforward: such patients may still develop unrelated dermatological conditions, such as psoriasis or allergic contact dermatitis, and distinguishing these from a true venous skin manifestation can be difficult. Rather than replacing duplex ultrasound study—which remains the diagnostic standard for confirming venous reflux—this tool is intended to support this downstream diagnostic step: by helping assess the likelihood that a skin lesion in a patient with known venous disease is venous in origin, as opposed to reflecting another skin or vascular inflammation, it could aid vascular specialists in distinguishing skin findings that warrant venous-directed management from those requiring dermatologic or internal medicine referral. The Swin Transformer architecture was selected for its capacity to model long-range dependencies through hierarchical feature extraction and shifted-window self-attention, which is particularly advantageous in dermoscopic analysis where disease-specific patterns may be obscured by hair, pigmentation, or illumination artifacts. Compared with CNN-based models, this enables more robust global contextual capture. Most previous artificial intelligence (AI)-based dermatological studies have focused on malignant skin lesion detection or disease severity assessment; deep learning has more recently been extended to inflammatory disorders using CNN architectures,32,33 although these may be limited in capturing complex spatial relationships in dermoscopic images relevant to venous conditions. For example, Yang et al35 developed an EfficientNet-B4-based model to distinguish psoriasis from other inflammatory dermatoses, including eczema and lichen planus, using 7033 dermoscopic images, achieving a sensitivity of 0.929 and specificity of 0.952. Similarly, Zhao et al16 proposed a ResNet-50-based model to differentiate rosacea from acne, seborrheic dermatitis, and eczema using more than 24,000 dermoscopic images, reporting an accuracy of 0.914 and precision of 0.898. Aggarwal et al36 applied an Inception-v3 (Google Research) model to classify acne, atopic dermatitis, impetigo, psoriasis, and rosacea using publicly available and clinical images, yielding a mean sensitivity of 0.653, specificity of 0.913, and F1-score of 0.655 across five disease categories. Liu et al37 used an Inception-v4-based model to classify 26 common adult skin conditions in a teledermatology setting, reporting sensitivities of 0.48 and 0.57 with positive predictive values of 0.96 and 0.95 in two validation cohorts. More directly relevant, our group previously developed a deep learning model using clinical photographs to recognize CVI-related skin changes in a binary classification framework, which demonstrated robust diagnostic performance in a multicenter validation cohort.38⁠ Building on this work, the present study extends deep learning-based classification of CVI-related skin lesions to dermoscopic imaging within a three-class framework, differentiating these lesions from both inflammatory dermatoses and vasculitis using exclusively biopsy-confirmed cases. A key methodological strength of this study is the exclusive use of histopathologically confirmed dermoscopic images. Unlike many previous AI studies on inflammatory skin disease that relied on clinical diagnoses to maximize dataset size, our dataset comprised only biopsy-proven cases, ensuring a higher standard of diagnostic reliability and scientific validity. Furthermore, organizing the classification task into three clinically meaningful groups reflecting distinct management pathways ensured that the model’s outputs directly align with real-world referral decisions. Dermatopathologically, the three groups reflect distinct pathogenic mechanisms despite their shared inflammatory component. CVI-related lesions (group A) arise from venous hypertension driving proliferation of thick-walled capillaries in the papillary dermis, with resultant eczematous change and, in advanced disease, septal fibrosis and lipomembranous fat necrosis characteristic of lipodermatosclerosis. Group B dermatoses are predominantly epidermal: psoriasis shows hyperkeratosis and parakeratosis with papillary dermal vessel dilation but no true vascular proliferation, whereas atopic and contact dermatitis are characterized by epidermal spongiosis with limited vascular involvement. Vasculitis (group C), by contrast, involves direct vessel wall injury with neutrophilic infiltration and leukocytoclasis, producing purpuric patches with minimal epidermal change. These divergent mechanisms yield sufficiently distinct patterns to allow differentiation, even though all three fall under the broad category of inflammatory skin disease—a distinction often intuitive to dermatologists but less accessible in primary care or vascular clinic settings, underscoring the potential value of an automated tool. Representative misclassified cases are shown in Fig 5. In panel A, subtle hemosiderin-related pigmentation against darker skin led to a CVI-related lesion being misclassified as vasculitis. Panel B shows a vasculitis case with a single, localized purpuric lesion—atypical for the more extensive or multifocal purpura typical of vasculitis—misclassified as a CVI-related lesion. In panel C, minimal scaling and prominent hyperpigmentation obscured the characteristic globules of psoriasis, leading to misclassification as a CVI-related lesion. Panel D shows a vasculitis case with a dominant hemorrhagic crust masking underlying features, misclassified as an inflammatory dermatosis. These errors generally involved overlapping or subtle dermoscopic features that are similarly difficult to distinguish in routine clinical practice. From a vascular specialist’s perspective, these misclassification patterns carry different clinical implications depending on error direction. Errors between groups A and C were most frequent: three CVI-related lesions were misclassified as vasculitis (group A → group C), risking an unnecessary rheumatologic referral but posing no direct harm, whereas the reverse—vasculitis read as a CVI-related lesion (group C → group A)—occurred only once, the riskier direction given the potential delay in systemic therapy. Errors between groups A and B were less common and unidirectional: two inflammatory dermatoses were misclassified as CVI-related lesions (group B → group A), which could delay appropriate dermatologic treatment in favor of unneeded venous-directed care, though with comparatively modest risk. Across both axes, the model tended to favor the lower-risk error direction; nonetheless, given the consequences of missing vasculitis or delaying dermatologic care, its output should function as a triage aid supporting, rather than replacing, clinician judgment. Notably, the criteria used to define group A in this study—PPD confined to the lower extremities without an identifiable causative drug or systemic condition—closely mirror the clinical presentation in which venous reflux is most often found on duplex ultrasound study.23,24 Accordingly, when a dermatologist identifies this pattern, it may reasonably prompt vascular specialists to pursue duplex evaluation for superficial venous insufficiency, even in the absence of overt varicose veins. Several limitations of this study warrant acknowledgment. First, the relatively small sample size and limited diversity of disease manifestations may restrict the generalizability of the proposed model. Although the exclusive use of histopathologically confirmed images ensures high diagnostic reliability, such data are inherently difficult to acquire, resulting in a total of 677 images. Nevertheless, as all diagnoses were established through evaluation by board-certified dermatologists together with histopathological confirmation, this dataset may offer a more reliable ground truth than considerably larger datasets labeled solely by clinical impression, an important consideration for AI models intended to support diagnostic decision-making. Second, venous reflux was not directly confirmed by duplex ultrasound study in this cohort, as duplex ultrasound study is not routinely performed as part of the standard dermatologic diagnostic workflow; classification of group A relied on clinical assessment and histopathological findings alone, informed by previous reports linking PPD and stasis dermatitis to venous insufficiency, rather than on duplex-confirmed reflux within the present dataset itself. Future work incorporating duplex ultrasound study data would allow more direct verification of the venous etiology underlying group A lesions. In particular, the dataset was predominantly composed of C4a lesions (such as stasis dermatitis and PPD), with limited representation of more advanced CVI-related conditions such as lipodermatosclerosis (C4b), corona phlebectatica (C4c), and venous ulcers (C5-C6). This reflects the inherent constraints of a single-center, biopsy-proven dermoscopic dataset: in patients with advanced CVD, marked skin fibrosis, venous congestion, and tissue hypoxia substantially increase the risk of wound healing complications, rendering biopsy generally inadvisable. Future studies incorporating multicenter data and broader disease spectra—ideally including nonbiopsy-confirmed cases to increase sample size—would enable more comprehensive coverage of the full CEAP clinical spectrum. Finally, the Swin Transformer-based model requires substantially higher computational resources during both training and inference compared with conventional CNN-based architectures, and further optimization will be necessary to facilitate deployment in real-world clinical settings. In addition, dermoscopic images in this study were acquired using a professional-grade dermoscope paired with a digital single-lens reflex camera, equipment that may not be routinely available in vascular surgery or interventional clinics. The growing availability of lower-cost, smartphone-attachable dermatoscopes could improve accessibility in such nondermatology settings, although the performance of the present model on images acquired with such devices remains to be validated. In practice, such devices could allow clinic staff to capture images at the point of care, with the model flagging inflammatory or vasculitic patterns for expedited specialist referral while directing CVI-related lesions toward duplex evaluation and venous-directed therapy. Conclusions The Swin Transformer-based deep learning model developed in this study demonstrated robust differentiation of CVI-related skin lesions from inflammatory dermatoses and vasculitis using biopsy-confirmed dermoscopic images. The proposed model has the potential to serve as a noninvasive, AI-assisted decision-support tool for clinicians encountering lower-extremity skin lesions, facilitating initial classification of lesion etiology, and guiding appropriate referral and management pathways, while reducing reliance on invasive diagnostic procedures. In the vascular clinic, such a tool could support point-of-care triage of C4-class skin changes, helping to identify patients who warrant duplex ultrasound assessment and venous-directed therapy vs those better served by dermatologic or rheumatologic referral, and may be particularly valuable in settings with limited access to dermatology and dermatopathology. Prospective, multicenter validation across the full CEAP clinical spectrum will be required before routine clinical adoption. Author Contributions Conception and design: KK, JN, SS, SB, BK Analysis and interpretation: JN, SS, SB Data collection: KK, JJ, BK Writing the article: KK, JN, JJ, SB, BK Critical revision of the article: KK, JN, SS, SB, BK Final approval of the article: KK, JN, SS, JJ, SB, BK Statistical analysis: JN, SS, SB Obtained funding: SB, BK Overall responsibility: BK KEK and JCN contributed equally to this article as co-first authors, and SB and BSK contributed equally to this work as co-senior authors. Data availability The dataset used in this study comprises dermoscopic images from patients whose diagnoses were confirmed histopathologically by skin biopsy. Given the sensitive nature of the data, external sharing is subject to institutional data governance regulations and requires approval from the relevant committee. Limited data sharing may be considered on a case-by-case basis for future collaborative research, provided that requests comply with institutional policies and applicable ethical standards. Inquiries regarding data access should be directed to Beom Suk Kim at grit@cauhs.or.kr. Declaration of generative AI and AI-assisted technologies in the writing process During the preparation of this work, the authors used Grammarly to improve readability and language. After using this tool, the authors reviewed and edited the content as needed and take full responsibility for the content of the publication. Funding This work was supported by the 10.13039/501100003725National Research Foundation of Korea (NRF) grant funded by the Korea Government (10.13039/501100014188MSIT; RS-2024-00352120 and RS-2022-NR070834). Disclosures None.