Out-of-Distribution Performance Analysis of Skin Lesion Classifiers for dermoscopic images | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article Out-of-Distribution Performance Analysis of Skin Lesion Classifiers for dermoscopic images Eva Milara, Vanesa Gómez-Martínez, David Chushig-Muzo, María Castro-Fernández, and 3 more This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-7544969/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract Background: The availability of public skin lesion image datasets has enabled rapid progress in classification tasks. However, models trained on datasets with similar characteristics, in-distribution (ID) data, often struggle to generalize to new and different data, limiting their utility in clinical settings. New methods are thus needed to assess algorithm performance and trustworthiness on out-of-distribution (OOD) data. Objective: This study aims to evaluate the generalization capacity and robustness of deep learning models for the binary classification (malignant vs non-malignant) of skin lesions by assessing their performance and predictive confidence in OOD settings. Methods: To this end, four convolutional neural networks (CNNs) —AlexNet, VGG, ResNet, and DenseNet— are trained using public datasets, which serve as the ID group. Their performance and reliability are then evaluated under distribution shifts by testing them on private datasets, considered OOD cohorts. Results: The VGG model achieves the best overall performance on the ID test set (AUROC = 0.895), maintaining balanced performance across OOD datasets. However, domain shift analysis reveals marked performance drops in specific domains, particularly those with strong distributional shifts in age and diagnosis. Conclusions: The results underscore the need for domain-aware evaluation and the development of models trained on more diverse and representative datasets to ensure generalization across clinically relevant populations. Artificial Intelligence and Machine Learning Out-of-distribution skin lesions image classification Figures Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Introduction According to the World Health Organization, skin cancer is one of the most frequently diagnosed malignancies worldwide [1]. In fact, in 2022, the incidence of skin cancer melanoma and non-melanoma was 331,722 and 1,234,533 cases, respectively, with corresponding mortality figures of 58,667 and 69,416 [2,3]. Early detection of skin lesions is crucial for improving prognosis, particularly in malignant cases. Traditional diagnostic workflows have relied on expert visual interpretation of dermoscopic images[4]. However, in recent years, there has been a notable shift toward artificial intelligence (AI)–based methods for image classification [5,6]. These developments announce a transition to automated and assisted systems designed to enhance the objectivity and reproducibility of skin cancer diagnosis [7–10]. Among these AI techniques employed, convolutional neural networks (CNNs) are among the most widely used, particularly those relying on the fine-tuning of pre-trained models with architectures such as AlexNet, VGG, GoogLeNet, ResNet, Xception, DenseNet, MobileNet, or EfficientNet through transfer learning [7–11]. The vast majority of these studies are trained and tested exclusively on public or commercial datasets. Only the works by Dorj et al. [12], Mishra et al. [13], and Masood et al. [14] employ self-collected datasets. Nevertheless, a key limitation of these studies is that the models are trained and validated exclusively on their private datasets, which leads to the same issue observed in the rest of the studies, i.e., overfitting to the specific data. This issue underlines the importance of going beyond internal validation to truly assess the robustness of these models. Although AI models have made significant progress in the classification of skin lesions, they still rely heavily on the assumption that training and testing data are independent and identically distributed (IID) [15]. Moreover, these models have been shown to infer demographic information from medical images, potentially leading to biased predictions [16]. Therefore, it becomes essential to assess the generalization capability of classification models by evaluating their performance on previously unseen datasets, referred to as out-of-distribution (OOD) data [15]. To the best of our knowledge, only two studies have addressed OOD assessment in the context of skin lesion classification. The study by Fogelberg et al. [17] focuses on characterizing, quantifying, and clustering dermoscopic datasets to evaluate the limitations in clinical translation, highlighting the lack of publicly available datasets where such domain shifts are properly described and quantified. On the other hand, the study by Chamarthi et al. [18] investigates the use of unsupervised domain adaptation methods to improve generalization across dermoscopic datasets. However, both studies restrict their evaluation to subsets of the publicly available ISIC (International Skin Imaging Collaboration) archive [19], without considering external or independent data sources. Considering the limitations associated with training and validating models on IID datasets, the present study aims to evaluate the generalization performance of four CNNs—AlexNet, VGG, ResNet, and DenseNet—for skin lesion classification. The models are trained and validated on three publicly available datasets (Derm7pt, ISIC-2020, and PH2), and their OOD performance is assessed on two independent private cohorts from the Hospital Italiano (Argentina) and the University Hospital of North Norway. Specifically, the study analyses: (1) the performance drop between the in-distribution (ID) training datasets and the OOD cohorts, and (2) the impact of clinical and demographic domain shifts—namely age, sex, and lesion location—on model generalization. These analyses aim to identify the scenarios in which the models exhibit the poorest performance and highlight the relevance of evaluating deep learning systems beyond traditional IID assumptions. Methods Figure 1 illustrates the overall methodology employed in this study. First, four CNNs are trained to differentiate between non-malignant and malignant skin lesions using images from three public datasets, and are also being tested on part of these datasets. To evaluate the capability of generalization of these models, an OOD analysis is conducted on two independent datasets not seen during training, also studying the similarity of their distributions with the ID dataset. This analysis is structured around domain shifts defined by biological factors, including patient age, sex, lesion location, and diagnosis, matching in ID and OOD datasets, and Fitzpatrick's skin type (obtained from the variables regarding natural hair color and skin reaction to sun), and family history only in OOD datasets. Materials In-distribution dataset To evaluate classification performance under OOD conditions, an ID dataset is constructed by combining three publicly available dermoscopic image datasets. These datasets were merged and subsequently split into 80% for training and 20% for testing, maintaining the original proportion of each source dataset across both subsets. The training dataset is subsequently used for training and validation. The content of each public dataset used is detailed below: 1. Derm7pt [20]. This dataset contains 2,022 dermoscopic images of skin lesions. For this study, 1,011 samples relevant to malignancy detection are selected. The resulting dataset includes 717 non-malignant and 294 malignant cases. 2. ISIC-2020 [19]. Provided by the International Skin Imaging Collaboration, this large-scale dataset includes dermoscopic images collected from various clinical centers. The ISIC-2020 subset used in this study originally contained 32,542 non-malignant images and 584 images labeled with melanoma, with image resolutions ranging from 640×480 to 6000×4000 pixels. After removing 434 duplicate entries and 26,188 images labelled as 'unknown', the dataset is reduced to 5,362 non-malignant images and 581 melanoma images. 3. PH2 [21]. The PH2 dataset consists of 200 high-resolution dermoscopic images collected at the Pedro Hispano Hospital in Matosinhos and the University of Porto, which have a resolution of 768×560 pixels, and are stored as 8-bit RGB files. Table 1 summarizes the metadata of these datasets, including lesion location and diagnostic subtypes. Table 1 Summary of the ID metadata, including lesion location and diagnostic subtypes. N: non-malignant; M: malignant; and Ttl: total. Set Locations Diagnosis N:M(Ttl) Derm7pt abdomen, back, chest, lower limbs, buttocks, upper limbs, head/neck, acral B : nevi (blue, combined, congenital, dermal, recurrent, and Reed or Spitz), atypical nevi (Clark’s nevus), seborrheic keratosis, lentigo, vascular lesions, dermatofibroma, melanosis, and other miscellaneous types M : melanoma, basal cell carcinoma, and melanoma metastasis 717:294 (1011) ISIC-2020 torso, lower extremity, upper extremity, head/neck, palms/soles, oral/genital B : melanocytic nevus, seborrheic keratosis, lichenoid keratosis, and lentigo M : melanoma 5,362:581 (5943) PH2 B : common nevi, and atypical nevi M : melanoma 160:40 (200) Out-of-distribution dataset To evaluate the performance of the classification models beyond the ID dataset, two distinct OOD datasets were used: one introduced by Ricci et al. [22] and one collected for the WARIFA (Watching the risk factors: Artificial intelligence and the prevention of chronic conditions) project [23]. Both are independently assessed. The dataset introduced by Ricci et al. [22] comprises 1,270 dermoscopic images corresponding to 1,191 unique skin lesions from 584 patients, collected at Hospital Italiano (HI) in Argentina. The images were acquired using different video microscopes and camera systems, including FotoFinder and Scalar devices. It includes high-quality expert annotations, with 58.2% of lesions confirmed by biopsy, comparable to biopsy rates in other public datasets. In addition, clinical and demographic metadata are provided, such as age, sex, anatomical location, lesion diagnostic subtype, Fitzpatrick skin type, and personal and family history of skin cancer. On the other hand, the WARIFA dataset was collected by Universidad Las Palmas de Gran Canaria (ULPGC) at the University Hospital of North Norway (UNN), in collaboration with the Departments of Dermatology and Plastic Surgery, for the WARIFA project. Images were acquired using a Xiaomi Redmi 9A smartphone equipped with a DermLite HÜD 2 dermoscope. All images underwent a visual inspection process, and those with poor or unrecoverable quality (e.g., excessive stray light or misalignment) were discarded. Then, images were manually cropped to 1,750 × 1,750 pixels. The dataset includes 1,518 dermoscopic images from 60 patients, corresponding to 260 lesions and scars, 30 of which were histopathologically confirmed. The remaining cases were clinically validated by consensus among four dermatologists. All lesions were classified into non-malignant and malignant categories. Although scars from excisions were also documented, they were excluded from the present analysis to focus solely on primary skin lesions, resulting in a total of 216 lesions. As multiple images are available for each lesion, a quality-based selection is performed to retain only the most informative image per lesion. Images are scored using five equally weighted metrics (sharpness, noise, exposure, contrast, and blur), with quality-enhancing features increasing the score and noise/blur reducing it. For each lesion, the image with the highest overall score is selected. For each patient, detailed demographic and clinical metadata are available, including age, sex, height, weight, hair color, skin response to sun exposure, number of moles, presence of moles larger than 5 mm in diameter, history of sunburns, use of sunbeds, personal and family history of cancer and skin cancer, history of organ transplantation, and immunosuppressive status. Fitzpatrick skin type classification is obtained for each patient through the natural hair color and the skin response to the sun. Additionally, for each lesion, the metadata includes the anatomical location, diagnostic subtype, and size of the lesion. The different values for the characteristics also present in the ID dataset (location and diagnostic subtype) are shown in Table 2 . Age and sex are not included since the former is a continuous variable and the latter is a categorical variable that can only take two values, respectively. Table 2 Summary of the OOD datasets metadata, including lesion location and diagnostic subtypes. N: non-malignant; M: malignant; and Ttl: total. Set Locations Diagnosis N:M(Ttl) HI anterior torso, posterior torso, lateral torso, lower extremity, upper extremity, head/neck, palms/soles, oral/genital B : nevus, seborrheic keratosis, lentigo, lichenoid keratosis, vascular lesion, dermatofibroma, and actinic keratosis M : melanoma, basal cell carcinoma, squamous cell carcinoma 737:533 (1270) UNN torso, back, legs, arms, face, head B : nevus, atypical nevus, seborrheic keratosis, vascular lesion, dermatofibroma, and actinic keratosis M : melanoma, basal cell carcinoma, squamous cell carcinoma 181:36 (217) Datasets pre-processing All images undergo a standardized pre-processing pipeline that includes hair removal, lesion segmentation, and image normalization. The hair removal approach is based on the combination of the YCbCr color space, the Attention U-Net (Att-Net)-based hair segmentation model, and Aggregated Contextual-Transformation-Generative Adversarial Network (AOT-GAN)-based image inpainting, as described in [24]. Lesion segmentation is subsequently performed using a Double U-Net model [25]. Images are normalized per channel using ImageNet mean and standard deviation values. To evaluate the subsets on which the model generalizes better or worse, metadata common to both OOD datasets is retained (Table 3 ). Four of them are available for ID and both OOD datasets: patient age and gender (or sex), lesion location, and diagnostic subtype. Among the ID datasets, ISIC-2020 and Derm7pt contain all the listed metadata except for age, which is available only in ISIC-2020. PH2 includes only the diagnosis of the lesion. On the other hand, Fitzpatrick skin type and family history of skin cancer are only available in OOD datasets, making it impossible to compare them with the ID dataset. Table 3 Demographic and clinical summary by set and class. Mean and standard deviation for age, percentage of the total in its class, and set for the rest of the variables. Lbl: label; Ml: Male; F: Female; N: non-malignant, M: malignant, Ttl: total. Set Lbl N Age Sex Fitzpatrick sky type Family hist. Ml F I II III IV No Yes OOD HI N 737 48.52 ± 17.35 42.39 57.61 6.02 59.49 30.72 3.77 77.52 22.48 M 533 69.66 ± 13.90 51.98 48.02 11.42 80.16 8.42 0.00 20.00 80.00 Ttl 1270 57.37 ± 19.09 46.41 53.59 8.34 68.36 21.15 2.15 59.48 40.52 UNN N 180 60.74 ± 18.29 42.22 57.78 22.78 43.44 0.00 33.98 86.67 13.33 M 37 71.29 ± 12.45 56.76 43.24 8.11 40.54 0.00 51.35 78.38 21.62 Ttl 217 62.54 ± 17.86 44.7 55.3 20.28 42.86 0.00 36.87 85.25 14.75 ID Test N 1250 49.66 ± 12.73 56.80 40.64 - - - - - - M 184 57.80 ± 15.77 47.83 47.83 - - - - - - Ttl 1434 50.46 ± 13.27 56.00 42.00 - - - - - - Train N 4987 50.50 ± 12.61 52.66 44.78 - - - - - - M 731 58.20 ± 16.37 55.95 39.67 - - - - - - Ttl 5718 51.25 ± 13.22 53.08 44.12 - - - - - - To ensure consistency across datasets, lesion locations are grouped into six generalized anatomical regions (see Table 4 ): torso (T), lower extremity (L_Ext), upper extremity (U_ext), head/neck (H/N), palms/soles (P/S), and oral/genital (O/G). Note that the UNN dataset does not contain lesions in the P/S or O/G regions. In some cases, original location labels were merged into broader categories to allow for consistent comparisons (see Table 1 and Table 2 ). For example, in the HI dataset, the torso group includes anterior, lateral, and posterior torso. Table 4 Percentage distribution of anatomical location of lesions by group and dataset. N: non-malignant, M: malignant; Ttl: total. Set Lbl N T L_ext U_ext H/N P/S O/G OOD HI N 737 44.64 20.22 10.18 11.80 1.49 0.68 M 533 26.83 17.64 11.26 38.27 2.06 0.38 Ttl 1270 37.17 19.13 10.63 22.91 1.73 0.55 UNN N 179 58.33 4.44 21.11 12.78 0.00 0.00 M 37 48.65 2.70 0.00 48.65 0.00 0.00 Ttl 217 56.68 4.15 17.51 18.89 0.00 0.00 ID Test N 1250 57.12 24.56 11.12 3.68 0.88 0.08 M 184 39.67 21.20 20.11 11.96 0.54 1.09 Ttl 1434 54.88 24.13 12.27 4.74 0.84 0.21 Train N 4987 54.90 26.47 11.13 3.79 1.00 0.14 M 731 43.91 22.02 14.77 12.59 0.96 0.41 Ttl 5718 53.50 25.90 11.59 4.91 1.00 0.17 Regarding lesion diagnostic subtype, lesions are categorized into: nevus (NEV), atypical nevus (ATY), seborrheic keratosis (SK), actinic keratosis (AK), dermatofibroma (DFB), vascular lesion (VASC), and lichenoid keratosis (LK) for the non-malignant class; and melanoma (MEL), basal cell carcinoma (BCC), and squamous cell carcinoma (SCC) for the malignant class. The frequency of each subtype across datasets is shown in Table 5 . Some subtypes present in the ID dataset do not appear in the OOD datasets and are labeled as 'Others'. Conversely, AK and SCC are not represented in the ID dataset. Table 5 Percentage distribution of diagnostic subtypes of lesions by group (non-malignant and malignant) and dataset. N: non-malignant; M: malignant. Diagnosis OOD ID HI UNN TEST TRAIN N NEV 74.49 43.33 85.44 85.28 ATY 0.00 4.44 6.40 6.40 SK 6.38 43.89 2.80 2.81 LEN 1.90 0.00 1.20 1.20 LK 0.14 0.00 0.40 0.54 VASC 5.56 2.22 0.48 0.46 DFB 5.29 1.11 0.32 0.32 AK 6.24 4.44 0.00 0.00 Others 0.00 0.00 0.40 0.38 M MEL 36.40 10.81 95.11 94.94 BCC 42.78 78.38 4.35 4.65 SCC 20.83 10.81 0.00 0.00 Others 0.00 0.00 0.54 0.41 Subgroup definitions based on biological factors To explore the robustness and reliability of the models across patient subpopulations, biologically meaningful subgroups based on age, sex, lesion location, and diagnosis are defined. The ID dataset used for training contains instances representing most of these subgroups (as seen in Table 3 , Table 4 , and Table 5 ). Notably, technical shifts exist between the ID and OOD datasets (HI and UNN), as images were acquired using different dermatoscopic devices and imaging protocols. These OOD datasets thus serve as external validation sources, allowing assessment of model performance under both biological and technical distribution shifts. Furthermore, Fitzpatrick skin type and family history of skin cancer, although potentially relevant biological variables, are only available in the OOD datasets. As a result, subgroup performance comparisons based on these variables are restricted to OOD datasets. In contrast, all other biologically defined subgroups are evaluated across both ID and OOD domains. A complete summary of the subgroups and their distribution is provided in Table 6 . Table 6 Domain shifts defined by biological factors for two OOD data sources (HI and UNN). Shift name Biological Factor Non-Malignant:Malignant (Total) Source = HI Source = UNN AU Age ≤ 30 122:9 (131) 21:0 (21) AB Age = (30, 60] 440:118 (558) 53:10 (63) AO Age > 60 172:405 (577) 105:27 (132) SM Sex = Male 312:276 (588) 76:21 (97) SF Sex = Female 424:255 (679) 103:16 (119) LT Location = Torso 329:143 (472) 105:18 (123) LL Location = Lower extremity 149:94 (243) 7:1 (8) LU Location = Upper extremity 75:60 (135) 38:0 (38) LH Location = Head/Neck 87:304 (291) 23:18 (41) LP Location = Palms/Soles 11:11 (22) 0:0 (0) LO Location = Oral/Genital 5:2 (7) 0:0 (0) DN Diagnosis = NEV 549:0 (549) 78:0 (78) DA Diagnosis = ATY 0:0 (0) 8:0 (8) DS Diagnosis = SK 47:0 (47) 79:0 (79) DL Diagnosis = LEN 14:0 (14) 0:0 (0) DLk Diagnosis = LK 1:0 (1) 0:0 (0) DV Diagnosis = VASC 41:0 (41) 4:0 (4) DD Diagnosis = DFB 39:0 (39) 2:0 (2) DAk Diagnosis = AK 46:0 (46) 8:0 (8) DM Diagnosis = MEL 0:194 (194) 0:4 (4) DB Diagnosis = BCC 0:228 (228) 0:29 (29) DSc Diagnosis = SCC 0:111 (111) 0:4 (4) FI Fitzpatrick = I 40:57 (97) 40:3 (43) FII Fitzpatrick = II 395:400 (795) 78:15 (93) FIII Fitzpatrick = III 204:42 (246) 0:0 (0) FIV Fitzpatrick = IV 25:0 (25) 61:19 (80) HN Family history = No 407:48 (455) 155:29 (184) HY Family history = Yes 118:192 (310) 24:8 (32) Distributional similarity analysis To assess the distributional differences between the ID dataset and the two OOD datasets, common variables are compared: age, sex, location, and diagnostic subtype. For each domain, the divergence between the ID and each OOD dataset is quantified using three metrics: Kullback–Leibler (KL) divergence [26], Jensen–Shannon (JS) divergence [27,28], and Cosine similarity [29]. Lower values indicate greater similarity for KL and JS divergences (with optimal values closest to 0), while higher values (closer to 1) indicate greater similarity for Cosine similarity. Specifically, for each variable, the distributions in the ID dataset are compared against those in the two OOD datasets independently. These metrics provide complementary perspectives on how similar or different the variable distributions are across test datasets. Skin lesion classifiers For the classification task, multiple pre-trained CNNs are implemented and trained, including AlexNet [30], VGG [31], ResNet [32], and DenseNet [33]. The specific versions for the last three are VGG16, ResNet50, and DenseNet121. These architectures were selected because they represent different milestones in the evolution of CNN design, offering complementary characteristics: AlexNet introduced deep CNNs into large-scale image recognition; VGG16 provides a deeper yet uniform architecture with small convolutional filters; ResNet50 incorporates residual connections to overcome vanishing gradient problems and improve training of very deep networks; and DenseNet121 exploits dense connectivity to enhance feature propagation and parameter efficiency. Prior studies on dermoscopic image classification have reported competitive performance with these architectures [7–10], making them suitable benchmarks to assess robustness under distribution shifts. A five-subset training procedure is employed. In each subset, the training set, the one that is previously separated from the test data set, is further divided into 80% for training and 20% for validation, using a different random seed for each split to ensure variability. For every subset, a new training process is performed independently, always starting from the same pre-trained model, without transferring knowledge from the previous runs. To mitigate the class imbalance between non-malignant and malignant lesions, an undersampling strategy is applied to the training data in each fold. No additional image augmentation or regularisation techniques are applied. Each model is trained with a maximum of 1000 epochs using an early stopping strategy with a patience of 50 epochs. Hyperparameters are tuned on the validation set, specifically the batch size (BS) with values of 4, 8, or 16 and the learning rate (LR) with values of 10 − 5 , 10 − 4 , 10 − 3 , or 10 − 2 , selecting the configuration that yields the best performance. Training is performed using the Adam optimizer with default parameters. Model performance is assessed using standard evaluation metrics: accuracy, F1-score, sensitivity, specificity, and area under the receiver operating characteristic curve (AUROC) [34,35]. The model achieving the best validation performance in each fold is then evaluated on the ID test set as well as on both OOD datasets to assess generalization. Out-of-distribution analysis In addition to the overall performance evaluation, the ability to generalize of the model is assessed for each domain shift defined in the OOD datasets. For variables shared between the ID and OOD datasets (age, sex, lesion location, and diagnostic subtype), model performance on OOD datasets (HI and UNN) is compared directly to the ID test subset. For variables exclusive to the OOD datasets (Fitzpatrick skin type and family history of skin cancer), performance comparisons are conducted between HI and UNN only, since these variables are not available in the ID dataset. Finally, model confidence is analyzed by examining the predicted probability for the malignant class across domains. To visualize differences in confidence across subgroups, boxplots are generated showing the distribution of predicted probabilities for each domain shift. Results Distributional similarity analysis Table 7 presents the distributional similarity between the ID dataset and the two OOD datasets (HI and UNN) across the biologically defined domains listed in Table 6 . Similarity is evaluated using KL, JS, and Cosine similarity metrics. Domains with JS > 0.05 and Cosine similarity < 0.9 are considered to exhibit notable distributional shifts. Table 7 Jensen-Shannon (JS), Kullback-Leibler (KL), and Cosine similarity between HI/UNN and ID domains across biological factors. KL and JS values over 0.05 and cosine similarity values under 0.9 are marked in italics. Domain HI vs ID UNN vs ID KL JS Cosine KL JS Cosine AU 0.011 0.003 0.999 0.037 0.011 0.997 AB 0.056 0.014 0.948 0.274 0.066 0.774 AO 0.207 0.056 0.870 0.452 0.118 0.675 SM 0.005 0.001 0.999 0.122 0.021 0.994 SF 0.029 0.007 0.972 0.038 0.010 0.963 LT 0.065 0.016 0.940 0.001 0.000 0.999 LL 0.008 0.002 0.997 0.249 0.045 0.965 LU 0.001 0.000 1.000 0.011 0.003 0.997 LH 0.127 0.037 0.972 0.087 0.025 0.984 LP 0.003 0.001 1.000 0.145 0.003 1.000 LO 0.001 0.000 1.000 0.033 0.001 1.000 DN 0.200 0.051 0.831 0.307 0.077 0.746 DA 0.172 0.020 0.998 0.004 0.001 1.000 DS 0.003 0.001 1.000 0.351 0.107 0.880 DL 0.000 0.000 1.000 0.183 0.004 1.000 DLk 0.003 0.000 1.000 0.057 0.001 1.000 DV 0.020 0.006 1.000 0.008 0.002 1.000 DD 0.022 0.007 1.000 0.003 0.001 1.000 DAk 0.037 0.013 0.999 0.038 0.013 0.999 DB 0.172 0.056 0.978 0.119 0.039 0.989 DSc 0.091 0.031 0.995 0.019 0.006 1.000 In general, most subgroup distributions are relatively consistent across datasets, with JS values close to 0 and cosine similarity near 1. However, noticeable distribution shifts are observed in specific subgroups. For age-based subgroups, the largest differences are observed in older patient groups (AO). For this domain, the JS divergence reaches 0.056 (HI) and 0.118 (UNN), with Cosine similarity values of 0.870 and 0.675, respectively, indicating a substantial distributional shift, particularly for UNN. Regarding sex, both male (SM) and female (SF) subgroups show low divergence overall. However, the SM domain in UNN presents a slightly elevated KL divergence of 0.122, suggesting a minor shift in male representation. For the location, none of the domains obtain values of JS > 0.05 or Cosine similarity < 0.9. The largest shifts are observed in LH (head/neck) and LL (lower extremity) for UNN, with JS values of 0.025 and 0.045, respectively. These suggest some shift in the location distributions. Finally, several lesion diagnoses show stronger divergence. The DN domain (nevus) exhibits scores of 0.051 and 0.077 for both HI and UNN, respectively, with cosine similarities of 0.831 and 0.746, indicating substantial distribution differences. A similar trend for DS is observed in the UNN dataset, with JS of 0.107 and cosine of 0.880. For the malignant diagnostic subtypes, DB also shows a moderate divergence (JS = 0.056 for HI, 0.039 for UNN). Interestingly, DB shows an unusually high KL of 0.172 between HI and ID but very low JS and high cosine similarity, suggesting a spike in frequency rather than a broad distributional shift. Performance evaluation Table 8 presents the classification performance results for the ID test set, as well as for the two OOD datasets, HI and UNN. The best performing model is found to be the VGG-based model with a BS of 8 and a LR of 10 − 5 . Among the five subsets conducted with this configuration, the one with the highest performance is retained for the subsequent OOD analysis. In the ID test set, the VGG model achieved the best overall performance, with the following metrics: accuracy = 0.833, F1-score = 0.724, sensitivity = 0.790, specificity = 0.840, and AUROC = 0.895. The only exception is sensitivity, for which the AlexNet model outperformed VGG, achieving a value of 0.814. In the OOD datasets, the DenseNet model shows the highest values for accuracy (HI = 0.670, UNN = 0.588), F1-score (HI = 0.666, UNN = 0.541), and specificity (HI = 0.637, UNN = 0.546). However, the best sensitivity in the HI set is achieved by the ResNet model (0.714), whereas in the UNN set, the AlexNet model obtains the highest (0.887), as in the ID set. Notably, the selected VGG16 model maintained balanced performance across all metrics in both OOD datasets, with all values exceeding 0.5, an outcome that is only matched by the DenseNet model. Finally, concerning the AUROC metric, the VGG model outperformed the other architectures in both OOD datasets, achieving values of 0.708 (HI) and 0.730 (UNN). When comparing OOD results with those obtained on the ID dataset, the VGG16 model exhibited a relative performance drop in the OOD datasets. Specifically, this corresponds to a decrease of 9.8%, 11.5%, and 20.9% in F1-score, sensitivity, and AUROC, respectively, for the HI dataset, and a reduction of 28.3%, 2.2%, and 18.4% for the UNN dataset. Table 8 Performance metrics for different architectures and sets: test of ID dataset, and both OOD datasets, i.e., HI and UNN. The highest value for the metric and set among the four possible architectures is shown in bold. BS LR Set Accuracy F1-Score Sensitivity Specificity AUROC AlexNet 8 10 − 4 ID 0.740 ± 0.016 0.638 ± 0.012 0.814 ± 0.032 0.729 ± 0.022 0.838 ± 0.020 HI 0.410 ± 0.069 0.400 ± 0.074 0.600 ± 0.052 0.272 ± 0.128 0.483 ± 0.062 UNN 0.336 ± 0.101 0.328 ± 0.093 0.887 ± 0.077 0.223 ± 0.135 0.645 ± 0.017 VGG 8 10 − 5 ID 0.833 ± 0.012 0.724 ± 0.011 0.790 ± 0.019 0.840 ± 0.017 0.895 ± 0.009 HI 0.655 ± 0.042 0.653 ± 0.040 0.699 ± 0.015 0.624 ± 0.079 0.708 ± 0.026 UNN 0.563 ± 0.067 0.519 ± 0.046 0.773 ± 0.073 0.521 ± 0.093 0.730 ± 0.030 ResNet 8 10 − 5 ID 0.743 ± 0.015 0.627 ± 0.018 0.723 ± 0.056 0.746 ± 0.016 0.793 ± 0.038 HI 0.626 ± 0.021 0.625 ± 0.022 0.714 ± 0.043 0.562 ± 0.036 0.653 ± 0.041 UNN 0.531 ± 0.037 0.499 ± 0.024 0.822 ± 0.073 0.472 ± 0.058 0.654 ± 0.043 DenseNet 4 10 − 5 ID 0.803 ± 0.032 0.683 ± 0.021 0.722 ± 0.068 0.816 ± 0.046 0.820 ± 0.034 HI 0.670 ± 0.033 0.666 ± 0.032 0.714 ± 0.080 0.637 ± 0.097 0.695 ± 0.019 UNN 0.588 ± 0.072 0.541 ± 0.052 0.795 ± 0.059 0.546 ± 0.097 0.684 ± 0.039 Out-of-distribution Analysis As mentioned above, for OOD analysis, both the difference in performance and the reliability of the prediction are evaluated. Furthermore, this evaluation is performed on both the variables present in both ID and OOD, as well as on the variables present only in OOD. Performance evaluation by domain Figure 2 shows the performance differences between the ID and the two OOD datasets (HI and UNN), measured in terms of (a) AUROC and (b) sensitivity, respectively, for the variables age, sex, and location. Domain shifts that contain only positive or negative samples are represented as missing values for AUROC, since this metric cannot be computed under such conditions. In these cases, performance is assessed solely using sensitivity, as in the AU group. A general trend can be observed in which AUROC tends to degrade more for the HI dataset than for UNN, with greater decreases in most domain shifts. Nevertheless, these differences are typically bounded within a range of 0.2 to 0.4. Regarding age-related domain shifts, performance degradation in AUROC is more pronounced in HI as age increases: the largest drop is observed for the AO group, followed by AB, and then AU. The same pattern is present in UNN, except for the AU group, where AUROC could not be computed because of the absence of positive cases. Notably, the AU group in HI shows a striking negative sensitivity difference of -0.6, indicating substantially higher sensitivity than in the ID dataset. For the sex variable, performance degradation is consistently greater in the SM group than in the SF group, with comparable trends observed in both OOD datasets. Finally, regarding the location variable, a general performance decrease is observed across domains, particularly pronounced for LL (also in LU and LP, but in this case due to the absence of malignant cases) in UNN. In contrast, the LO domain in HI exhibits a substantial improvement, which is of particular interest due to its low frequency in the ID dataset, both in training and test sets (see Table 4 ). For the evaluation of the domain shifts defined by the diagnosis of the lesion (Fig. 3 ), accuracy is used, since all samples within each diagnostic subtype belong to a single class (non-malignant or malignant), rendering AUROC values undefined. In this context, for non-malignant diagnostic subtypes, the accuracy metric corresponds to specificity, as there are no true positives or false negatives, while for malignant subtypes, it reflects sensitivity, given the absence of true negatives and false positives. Among non-malignant diagnoses, DV shows a notably better performance in OOD datasets compared to ID, with a difference in accuracy ranging between − 0.5 and − 0.6. DS subtype also exhibits a slight improvement (difference between 0 and − 0.2). In contrast, several diagnostic subtypes—DN, DA, DL, and DLk—demonstrate a clear performance drop in OOD datasets, with accuracy differences exceeding 0.2. For the non-malignant diagnostic subtype not represented in the ID dataset (DAk), accuracy values in both OOD datasets are above 0.2 but remain below 0.6, indicating a limited generalization. Regarding malignant diagnoses, the DM subtype shows a slight improvement in accuracy in the HI dataset, whereas in the UNN dataset, a decline of approximately 0.2 is observed. The DB subtype exhibits a marked decrease in performance in both OOD datasets, with the degradation more pronounced in HI. Lastly, for the malignant subtype not present in the ID dataset (DSc), accuracy falls below 0.5 in both OOD datasets, suggesting a poor generalization for this class. Figure 4 presents the performance results, in terms of (a) AUROC and (b) sensitivity, for the variables that are only available in the OOD datasets. For the Fitzpatrick skin type, acceptable performance is observed for FI and FII, although FII shows slightly lower sensitivity in the HI dataset. Sensitivity values of 0 are associated with the absence of malignant cases for type FIV in HI and type FIII in the UNN dataset, which limits the interpretability in these subgroups. Regarding the family history of skin cancer, the HN group shows consistent sensitivity across both OOD datasets, with only minor differences in AUROC, all exceeding 0.6. In contrast, the HY group displays clearly better performance in the HI dataset, with acceptable values for both metrics, while in the UNN dataset, neither AUROC nor sensitivity reaches 0.5, suggesting poor generalization in this subgroup. Model confidence by domain Finally, the confidence of the model across the different domain shifts is evaluated for all datasets: the ID test set, HI, and UNN. Figure 5 presents the results for the variables age, sex, and location. In general, the ID dataset shows narrower confidence intervals that are closer to the optimal values (i.e., 0 for the negative class and 1 for the positive class), followed by UNN and, lastly, HI. When comparing the two OOD datasets, UNN exhibits more compact confidence distributions than HI, whose intervals are considerably wider and thus more difficult to interpret reliably. Notably, several specific domains display strong confidence levels. For the UNN dataset, LL, LU, SF, and LT show particularly low-spread confidence distributions. In the HI dataset, AU and LO stand out for the positive class, exhibiting confidence levels that even surpass those observed in the ID set. Regarding the confidence evaluation based on the diagnosis of the lesion (Fig. 6 ), the model shows generally low confidence in the ID dataset, except for the subtypes DN, DM, and DB, those with the highest number of samples, where confidence is better. Most non-malignant diagnoses in the ID dataset (DA, DS, DL, DLk, and DV) exhibit confidence intervals centered around or slightly above 0.5, indicating moderate uncertainty in classification. In the HI dataset, confidence intervals are generally wide and poorly calibrated, limiting the reliability of interpretation. Notable exceptions include high confidence for DS and DL subtypes, and low confidence for DB and DSc, suggesting class-dependent variation in generalization performance. Finally, in the UNN dataset, the DV subtype stands out with relatively well-calibrated confidence values, whereas other subtypes, such as DA and DAk, show highly inadequate confidence estimates, further highlighting the limited ability to generalize to these diagnostic categories. For variables collected exclusively in the OOD datasets (Fitzpatrick skin type and family history of skin cancer), the confidence distributions are shown as boxplots in Fig. 7 . Due to the broad ranges and the concentration of predicted probabilities around 0.5, the interpretability of these results is limited. This suggests that the model exhibits high uncertainty in these subgroups, which hinders reliable conclusions about its confidence in classification. Discussion Despite the large number of studies focused on the classification of skin lesions, the majority rely on public datasets and report performance based on ID evaluation within these same datasets. Only a limited number of studies assess model performance on truly independent data, or OOD data, which obscures the real-world generalization of these approaches. To address this gap, the present study focuses on evaluating deep learning models on OOD datasets. The divergence analysis reveals that most biologically defined subgroups exhibited high distributional similarity between the ID dataset and both OOD datasets (HI and UNN). However, some subgroups show meaningful shifts that may impact model performance. The best example is AO, showing a clear divergence, particularly in the UNN dataset (JS = 0.118, cosine = 0.675), indicating a notable over-representation caused by no malignant cases in this domain. Diagnosis-related subgroups, especially DN, also display divergence in both HI and UNN, suggesting substantial changes in the prevalence of the diagnostic subtype of lesions. For the sex variable, divergence is generally limited, although the SM subgroup in UNN shows a slightly higher KL value (0.122), hinting at a mild imbalance in male representation. Location subgroups show moderate shifts, with relatively high cosine similarities (> 0.96), indicating non-drastic changes. Interestingly, certain diagnostic subtypes (e.g., DA) show high KL divergence but low JS and high cosine similarity, pointing to sharp frequency spikes rather than broad distributional shifts, highlighting the importance of interpreting these metrics in combination. These findings support the presence of relevant domain shifts in specific subgroups, particularly in age and diagnosis, which can contribute to the performance degradation observed in OOD evaluations. A comprehensive understanding of these shifts is essential for developing more robust and generalizable models as it reveals the degree of divergence between ID and OOD data distributions. Identifying such discrepancies allows researchers to anticipate scenarios where models are likely to underperform and to design strategies—such as domain adaptation, data augmentation reflecting real-world exposures, or the inclusion of more diverse training cohorts—that can mitigate these gaps. In future work, expanding datasets with multi-institutional and demographically heterogeneous samples could be a key step towards reducing distributional biases and improving clinical applicability. The selected VGG model (BS = 8, LR = 10 − 5 ) achieves the best overall results in the ID test set and maintains acceptable performance across all OOD metrics. However, other architectures, such as DenseNet, outperform it in specific metrics within the OOD datasets. A closer inspection reveals that domain shifts substantially impact classification performance in specific subgroups. In particular, performance degradation is more pronounced in the HI dataset than in UNN, consistent with the stronger distributional shifts observed in earlier analyses. Age-related shifts, especially in AO, are associated with substantial drops in AUROC and sensitivity, suggesting that age imbalance between training and OOD datasets may significantly affect model generalization, as seen in the divergence analysis. Similar trends are observed in other variables such as sex and location of the lesion, with male patients (SM) and certain anatomical regions (e.g., LL, LU) showing reduced performance, coinciding with previous tests. The analysis by diagnostic subtype further highlights the sensitivity of the model to shifts in class composition. Although some non-malignant lesions, such as DV and DS, maintain or even improve performance in OOD datasets, others, particularly those underrepresented during training (e.g., DA, DLk), show marked declines. This effect is even more evident for malignant subtypes such as DB and DSc, where generalization failed altogether in some cases. Lastly, results for variables only available in OOD datasets (e.g., Fitzpatrick skin type and family history) reveal limited interpretability in subgroups with few positive cases, and notable performance asymmetries between datasets, especially in HY, where the model performs poorly in UNN. These findings reinforce the importance of subgroup-level evaluation when assessing model robustness beyond global metrics. The results of model confidence are shown in Fig. 5 , Fig. 6 , and Fig. 7 . Overall, the ID dataset exhibits the most compact and well-calibrated confidence distributions. Between the two OOD datasets, UNN generally maintained tighter confidence ranges, indicating a comparatively better calibration. In this case, it should be noted that the HI dataset has a much higher number of samples than UNN (1270 vs. 217), which may cause greater variability. At the domain level, several subgroups demonstrated strong confidence patterns. In UNN, SF, LL, and LU show well-calibrated confidence distributions. In HI, AU, and LO stood out, with confidence for the positive class even exceeding that of ID in some cases. When analyzed by diagnosis of the lesion (Fig. 6 ), the model shows low confidence in most ID subtypes, except for DN, DM, and DB - the most represented classes - where the confidence is markedly higher. In the HI dataset, confidence intervals are generally wide and poorly calibrated, limiting interpretability. Exceptions include higher confidence for DS and DL and markedly low confidence for DB and DSc, reflecting poor generalization for those subtypes. In contrast, the UNN dataset shows more reliable confidence for DV, while DA and DAk exhibit very low and uninformative values. Finally, for the OOD-only variables (Fitzpatrick skin type and family history), confidence distributions (Fig. 7 ) are broad and centered around 0.5, limiting interpretability and suggesting high uncertainty in these underrepresented subgroups. Compared to existing studies, the works by Fogelberg et al. [17] and Chamarthi et al. [18] are based on the ISIC dataset and do not incorporate truly independent OOD datasets. Among them, Fogelberg et al. conducted the most similar analysis, but it focuses solely on distinguishing between NEV and MEL and mainly explores technical shifts, including only two clinical variables: age and location, limiting the study based on biological shifts. Despite the novelty of the present study, it is not exempt from some limitations. First, among the datasets used to define the ID set, only ISIC includes all clinical variables that allow direct matching with the OOD datasets. Derm7pt lacks patient age, and PH2 lacks age, sex, and location, which limits consistent domain shift analysis. Additionally, certain domain shifts—such as specific diagnostic subtypes (e.g., DAk and DSc)—are not represented in the ID dataset, preventing a direct comparison with OOD samples. Furthermore, variables such as Fitzpatrick skin type and family history of skin cancer are only available in the OOD datasets, which restricts their interpretability in the absence of corresponding ID distributions. Regarding the OOD datasets themselves, limitations include the small number of samples—especially in the UNN dataset—and class imbalance between malignant and non-malignant lesions. Moreover, clinical variables across datasets are not always annotated using consistent criteria, requiring aggregation into broader, less specific categories to enable alignment. From a methodological standpoint, the study relies on four CNN architectures, while well-established and effective for similar tasks, they are relatively outdated compared to more recent advances in deep learning. Additionally, the optimization of hyperparameters, such as BS and LR, is performed using a grid search, which may be less efficient or flexible than more adaptive strategies (e.g., Bayesian optimization or population-based training). Based on these findings, future work should focus on developing models that are more generalizable to the underrepresented or challenging domains identified in this study. Further investigation of technical domain shifts (e.g., image acquisition differences) is also warranted to better understand their influence on model robustness. Expanding the range of model architectures and incorporating larger and more diverse datasets with harmonized clinical annotations will also be essential to advance toward real-world deployment. Conclusions This study provides an evaluation of deep learning models for skin lesion classification under OOD conditions, incorporating clinically meaningful domain shifts such as age, sex, lesion location, and diagnosis. By analyzing performance across two independent datasets, it is revealed that models trained on public data often fail to generalize to real-world clinical scenarios. Subgroup-specific evaluation proved essential to uncover performance disparities that are not captured by global metrics. Notable examples include younger patients (AO), male individuals (SM), or certain body locations such as the lower (LL) or upper limbs (LU). Moreover, the absence of certain diagnoses in ID datasets (DAk or DSc) reveals the limitations of models trained with these public datasets. Finally, the lack of relevant metadata, such as Fitzpatrick's skin type, is emphasised, as it may be crucial for assessing model generalization across diverse populations. These results underscore the need for domain-aware evaluation strategies and the development of models explicitly designed to handle biological and technical variability. Achieving robust performance in real-world settings will require more diverse datasets, standardized metadata annotations, and the adoption of adaptive training methods capable of improving generalization under distributional shift. Abbreviations AI: Artificial Intelligence AK: Actinic keratosis AOT-GAN: Aggregated Contextual-Transformation-Generative Adversarial Network Att-Net: Attention U-Net ATY: Atypical nevus AUROC: Area under the receiver operating characteristic curve BCC: Basal cell carcinoma BS: Batch size CNNs: Convolutional Neural Networks DFB: Dermatofibroma H/N: Head/Neck HI: Hospital Italiano ID: In-distribution IID: Independent and identically distributed ISIC: International Skin Imaging Collaboration JS: Jensen–Shannon KL: Kullback–Leibler L_ext: Lower extremity LK: Lichenoid keratosis LR: Learning rate MEL: Melanoma NEV: Nevus O/G: Oral/Genital OOD: Out-of-distribution P/S: Palms/Soles SCC: Squamous cell carcinoma SK: Seborrheic keratosis T: Torso U_ext: Upper extremity ULPGC: Universidad Las Palmas de Gran Canaria UNN: University Hospital of North Norway VASC: Vascular lesion WARIFA: Watching the risk factors: Artificial intelligence and the prevention of chronic conditions Declarations Acknowledgements This work was supported by the European Commission through the H2020-EU.3.1.4.2, European Project WARIFA (Watching the risk factors: Artificial intelligence and the prevention of chronic conditions) under Grant Agreement; and by the Spanish federal grants PID2019-107768RA-I00 \& PID2023-149457OB-I00 (all funded by the agency AEI/10.13039/501100011033). The study sponsors have not been involved in any stage of the study. Conflicts of Interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. References International Agency for Research on Cancer, Skin cancer – IARC, (2025). https://www.iarc.who.int/ (accessed September 4, 2025). J. Ferlay, M. Ervik, F. Lam, M. Laversanne, M. Colombet, L. Mery, M. Piñeros, A. Znaor, I. Soerjomataram, F. Bray, Global Cancer Observatory: Cancer Today, (2024). H. Sung, J. Ferlay, R.L. Siegel, M. Laversanne, I. Soerjomataram, A. Jemal, F. Bray, Global cancer statistics 2020: GLOBOCAN estimates of incidence and mortality worldwide for 36 cancers in 185 countries, CA Cancer J Clin (2021). https://doi.org/10.3322/caac.21660. H.D. Heibel, L. Hooey, C.J. Cockerell, A Review of Noninvasive Techniques for Skin Cancer Detection in Dermatology, Am J Clin Dermatol 21 (2020) 513–524. https://doi.org/10.1007/S40257-020-00517-Z. M. Hasan, N. Naik, R. Gupta, N. Krishnan, N.M. Nasrabadi, A survey, review, and future trends of skin lesion segmentation and classification, ArXiv Preprint ArXiv:2208.12232 (2022). https://arxiv.org/abs/2208.12232. M. Goyal, A. Oakley, P. Bansal, D. Dancey, M.H. Yap, Artificial Intelligence–Based Image Classification for Diagnosis of Skin Cancer: Challenges and Opportunities, ArXiv Preprint ArXiv:1911.11872 (2019). https://arxiv.org/abs/1911.11872. Y. Wu, B. Chen, A. Zeng, D. Pan, R. Wang, S. Zhao, Skin Cancer Classification With Deep Learning: A Systematic Review, Front Oncol 12 (2022) 893972. https://doi.org/10.3389/fonc.2022.893972. D. Popescu, M. El-Khatib, H. El-Khatib, L. Ichim, New Trends in Melanoma Detection Using Neural Networks: A Systematic Review, Sensors 22 (2022) 496. https://doi.org/10.3390/s22020496. A. Naeem, M.S. Farooq, A. Khelifi, A. Abid, Malignant Melanoma Classification Using Deep Learning: Datasets, Performance Measurements, Challenges and Opportunities, IEEE Access 8 (2020) 110575–110597. https://doi.org/10.1109/ACCESS.2020.3001507. J. Saeed, S. Zeebaree, Skin Lesion Classification Based on Deep Convolutional Neural Networks Architectures, Journal of Applied Science and Technology Trends 2 (2021) 41–51. https://doi.org/10.38094/jastt20189. V. Gómez-Martínez, D. Chushig-Muzo, M.B. Veierød, C. Granja, C. Soguero-Ruiz, Ensemble feature selection and tabular data augmentation with generative adversarial networks to enhance cutaneous melanoma identification and interpretability, BioData Min 17 (2024) 46. https://doi.org/10.1186/s13040-024-00397-7. U.-O. Dorj, K.-K. Lee, J.-Y. Choi, M. Lee, The skin cancer classification using deep convolutional neural network, Multimed Tools Appl 77 (2018) 9909–9924. https://doi.org/10.1007/s11042-018-5714-1. S. Mishra, H. Imaizumi, T. Yamasaki, Interpreting Fine-Grained Dermatological Classification by Deep Learning, in: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), IEEE, 2019: p. 0. https://doi.org/10.1109/CVPRW.2019.00331. A. Masood, A. Al-Jumaily, K. Anam, Self-Supervised Learning Model for Skin Cancer Diagnosis, in: 2015 7th International IEEE/EMBS Conference on Neural Engineering (NER), IEEE, Manhattan, New York, USA, 2015: pp. 1012–1015. https://doi.org/10.1109/NER.2015.7146798. H. Yu, J. Liu, X. Zhang, J. Wu, P. Cui, A Survey on Evaluation of Out-of-Distribution Generalization, ArXiv Preprint ArXiv:2308.13601 (2023). Y. Yang, H. Zhang, J.W. Gichoya, D. Katabi, M. Ghassemi, The limits of fair medical imaging AI in real-world generalization, Nat Med (2024). https://doi.org/10.1038/s41591-024-03113-4. K. Fogelberg, S. Chamarthi, R.C. Maron, J. Niebling, T.J. Brinker, Domain shifts in dermoscopic skin cancer datasets: Evaluation of essential limitations for clinical translation, N Biotechnol 76 (2023) 106–117. https://doi.org/10.1016/j.nbt.2023.04.006. S. Chamarthi, K. Fogelberg, T.J. Brinker, J. Niebling, Mitigating the influence of domain shift in skin lesion classification: A benchmark study of unsupervised domain adaptation methods, Inform Med Unlocked 44 (2024) 101430. https://doi.org/10.1016/j.imu.2023.101430. V. Rotemberg, N. Kurtansky, B. Betz-Stablein, L. Caffery, E. Chousakos, N. Codella, M. Combalia, S. Dusza, P. Guitera, D. Gutman, A. Halpern, B. Helba, H. Kittler, K. Kose, S. Langer, K. Lioprys, J. Malvehy, S. Musthaq, J. Nanda, O. Reiter, G. Shih, A. Stratigos, P. Tschandl, J. Weber, H.P. Soyer, A patient-centric dataset of images and metadata for identifying melanomas using clinical context, Sci Data 8 (2021) 34. https://doi.org/10.1038/s41597-021-00815-z. J. Kawahara, S. Daneshvar, G. Argenziano, G. Hamarneh, Seven-Point Checklist and Skin Lesion Classification Using Multitask Multimodal Neural Nets, IEEE J Biomed Health Inform 23 (2019) 538–546. https://doi.org/10.1109/JBHI.2018.2824327. teresa Mendoça, P.M. Ferreira, A.R.S. Marçal, C. Barata, J.S. Marques, J. Rocha, J. Rozeira, Accurate and Scalable System for Automatic Detection of Malignant Melanoma, in: Dermoscopy Image Analysis, CRC Press, 2015: pp. 309–360. https://doi.org/10.1201/b19107-14. L. Ricci, N. Fink, L. Alonso, E.A. Luzzardi, G. Lijteroff, M.A. González, R. Cataldi, J. González, I.H. Medrano, A patient-centric dermoscopic and clinical skin image dataset collected in Argentina, Sci Data 10 (2023) 528. https://doi.org/10.1038/s41597-023-02630-0. M. Castro-Fernandez, T. Schopf, I. Castaño-Gonzalez, B. Roque, H. Kirchesch, S. Ortega Sarmiento, H. Fabelo, F. Godtliebsen, C. Granja, G. Callico, MCR-SL: A Multimodal, Context-Rich Skin Lesion Dataset for Skin Cancer Diagnosis , (2025). https://doi.org/10.5281/zenodo.17056062. V. Gómez-Martínez, others, A Data-Driven Approach for Digital Hair Removal in Dermoscopy Images Using Encoder-Decoder and Generative Adversarial Network-Based Models, 2024. D. Jha, M.A. Riegler, D. Johansen, P. Halvorsen, H.D. Johansen, DoubleU-Net: A deep convolutional neural network for medical image segmentation, in: Proceedings of the IEEE Symposium on Computer-Based Medical Systems (CBMS), Institute of Electrical and Electronics Engineers Inc., 2020: pp. 558–564. S. Kullback, R.A. Leibler, On information and sufficiency, The Annals of Mathematical Statistics 22 (1951) 79–86. https://doi.org/10.1214/aoms/1177729694. J. Lin, Divergence measures based on the Shannon entropy, IEEE Trans Inf Theory 37 (1991) 145–151. https://doi.org/10.1109/18.61115. D.M. Endres, J.E. Schindelin, A new metric for probability distributions, IEEE Trans Inf Theory 49 (2003) 1858–1860. https://doi.org/10.1109/TIT.2003.813506. G. Salton, M.J. McGill, Introduction to Modern Information Retrieval, McGraw-Hill, Inc., 1983. A. Krizhevsky, I. Sutskever, G.E. Hinton, ImageNet classification with deep convolutional neural networks, in: Advances in Neural Information Processing Systems (NeurIPS), 2012: pp. 1097–1105. K. Simonyan, A. Zisserman, Very deep convolutional networks for large-scale image recognition, in: International Conference on Learning Representations (ICLR), 2015. K. He, X. Zhang, S. Ren, J. Sun, Deep residual learning for image recognition, in: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016: pp. 770–778. G. Huang, Z. Liu, L. Van Der Maaten, K.Q. Weinberger, Densely connected convolutional networks, in: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017: pp. 4700–4708. M. Sokolova, G. Lapalme, Performance measures in classification of human communications, Inf Process Manag 45 (2009) 427–437. T. Fawcett, An introduction to ROC analysis, Pattern Recognit Lett 27 (2006) 861–874. Additional Declarations The authors declare no competing interests. Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-7544969","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":510839835,"identity":"8b3b55d9-e77e-44e9-a994-a3885e7a9e00","order_by":0,"name":"Eva Milara","email":"","orcid":"","institution":"Department of Signal Theory and Communications, Telematics and Computing Systems, Rey Juan Carlos University, Madrid, Spain","correspondingAuthor":false,"prefix":"","firstName":"Eva","middleName":"","lastName":"Milara","suffix":""},{"id":510840302,"identity":"4a387b8d-c0ae-46bc-8a1e-abd98a806827","order_by":1,"name":"Vanesa Gómez-Martínez","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA3klEQVRIiWNgGAWjYNCDDwwMzKTpYJxBshZmHmJUGRw/e/DhjxoGu36xw4c/27bdY+dvYD78Aa+WM3nJxjzHGJJnzk5LMM5tK2aWOMCWJoFPi2RDjpk0AxtDssHtHIPk3LYEZgMGHjO8DpPsf2P+88c/kJb8D4ctwVr4P+N1GL9EjhkDbxuDHdAWxmZGiC0MeB3GL/HGWJq3TyJBcnaaMWPPuQRmicNsZni1sPHnGH788c3Gnl86+fGHH2UJyfztzY/xOgwKJBIboKxkoiPTHsawI1LDKBgFo2AUjCAAAAUqP+7BEz1rAAAAAElFTkSuQmCC","orcid":"","institution":"Department of Signal Theory and Communications, Telematics and Computing Systems, Rey Juan Carlos University, Madrid, Spain","correspondingAuthor":true,"prefix":"","firstName":"Vanesa","middleName":"","lastName":"Gómez-Martínez","suffix":""},{"id":510840303,"identity":"d5c7b0a8-d58e-4e1f-9ff7-a233533ba499","order_by":2,"name":"David Chushig-Muzo","email":"","orcid":"","institution":"Department of Signal Theory and Communications, Telematics and Computing Systems, Rey Juan Carlos University, Madrid, Spain","correspondingAuthor":false,"prefix":"","firstName":"David","middleName":"","lastName":"Chushig-Muzo","suffix":""},{"id":510840304,"identity":"9bafe060-fa11-405f-a2de-ea1903ca54ec","order_by":3,"name":"María Castro-Fernández","email":"","orcid":"","institution":"Institute for Applied Microelectronics, University of Las Palmas de Gran Canaria, Las Palmas de Gran Canaria, Spain","correspondingAuthor":false,"prefix":"","firstName":"María","middleName":"","lastName":"Castro-Fernández","suffix":""},{"id":510840305,"identity":"37acf076-3375-4bdd-8458-9f6403bcd933","order_by":4,"name":"Gustavo M. Callico","email":"","orcid":"","institution":"Institute for Applied Microelectronics, University of Las Palmas de Gran Canaria, Las Palmas de Gran Canaria, Spain","correspondingAuthor":false,"prefix":"","firstName":"Gustavo","middleName":"M.","lastName":"Callico","suffix":""},{"id":510840306,"identity":"15b01ae5-a69a-479d-9c43-d956b3c4ab29","order_by":5,"name":"Conceição Granja","email":"","orcid":"","institution":"Norwegian Centre for E-health Research, University Hospital of North Norway, Tromsø, Norway","correspondingAuthor":false,"prefix":"","firstName":"Conceição","middleName":"","lastName":"Granja","suffix":""},{"id":510840307,"identity":"6aa297e3-b582-424a-a29f-f6a922d53c6a","order_by":6,"name":"Cristina Soguero-Ruiz","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAABDklEQVRIiWNgGAWjYFACxgYGBgMkPj8DKh+7lgPISiQbCGoBggPIHIMD2BUhnDH7cPPnDwV35Bn4Dx9+zVNxT874Ru6Dgh8MNva4tEicS2yTOGDwzLBBIi3NmudMsbHZjXQDwx6GtMQGHFoMeBjbgH45zNggwWNmzNuWkLjtRhqDMQPD4QRctgC1NH8AarFv4D8D1PIvIXHzDLCW/zgdBtTSAHTYYaAzcowf8zYkJG6QAGs5wIjLYRJnGNskzhgcTm4D+oVxzrEEY4kzzxgMewyScfqFv4f98YeKP4dt+4Eh9uFNTYIcf3sam8GPCjucDoMDNiCSgLENiIhMMGD+AGM8IE7DKBgFo2AUjBAAAKD2UrlmQaiuAAAAAElFTkSuQmCC","orcid":"","institution":"Department of Signal Theory and Communications, Telematics and Computing Systems, Rey Juan Carlos University, Madrid, Spain","correspondingAuthor":true,"prefix":"","firstName":"Cristina","middleName":"","lastName":"Soguero-Ruiz","suffix":""}],"badges":[],"createdAt":"2025-09-05 14:05:42","currentVersionCode":1,"declarations":{"humanSubjects":false,"vertebrateSubjects":false,"conflictsOfInterestStatement":false,"humanSubjectEthicalGuidelines":false,"humanSubjectConsent":false,"humanSubjectClinicalTrial":false,"humanSubjectCaseReport":false,"vertebrateSubjectEthicalGuidelines":false},"doi":"10.21203/rs.3.rs-7544969/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-7544969/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":90895387,"identity":"4615f6ec-0956-4ed6-958d-313d365d3948","added_by":"auto","created_at":"2025-09-09 11:32:54","extension":"png","order_by":1,"title":"Figure 1","display":"","copyAsset":false,"role":"figure","size":143439,"visible":true,"origin":"","legend":"\u003cp\u003eMethodology for OOD generalization analysis based on biological factors.\u003c/p\u003e","description":"","filename":"1.png","url":"https://assets-eu.researchsquare.com/files/rs-7544969/v1/a8bbae1f732addbe0801014f.png"},{"id":90895391,"identity":"38d084ec-165d-4b0a-bf5d-aba41e58eab1","added_by":"auto","created_at":"2025-09-09 11:32:54","extension":"png","order_by":2,"title":"Figure 2","display":"","copyAsset":false,"role":"figure","size":107165,"visible":true,"origin":"","legend":"\u003cp\u003eDifference on (a) AUROC and (b) sensitivity performance between ID and OOD datasets across biological factors (age, sex, and location).\u003c/p\u003e","description":"","filename":"2.png","url":"https://assets-eu.researchsquare.com/files/rs-7544969/v1/a39ec27f76c6edea75f76431.png"},{"id":90895371,"identity":"b7cfa1c3-83f8-4410-9281-4e75b44f95c7","added_by":"auto","created_at":"2025-09-09 11:32:53","extension":"png","order_by":3,"title":"Figure 3","display":"","copyAsset":false,"role":"figure","size":65133,"visible":true,"origin":"","legend":"\u003cp\u003eDifference in accuracy performance between ID and OOD datasets across lesion diagnosis. For diagnoses not present in the ID set (DAk and DSc), an accuracy of 0 is defined in order to evaluate overall performance in the OODs without taking the difference into account.\u003c/p\u003e","description":"","filename":"3.png","url":"https://assets-eu.researchsquare.com/files/rs-7544969/v1/224bc662cd716dcfbb2fe36d.png"},{"id":90895364,"identity":"373fa422-6f7b-4477-82d6-443e074ed51a","added_by":"auto","created_at":"2025-09-09 11:32:53","extension":"png","order_by":4,"title":"Figure 4","display":"","copyAsset":false,"role":"figure","size":79354,"visible":true,"origin":"","legend":"\u003cp\u003e(a) AUROC and (b) sensitivity performance across biological factors available only in OOD datasets (Fitzpatrick skin type and family history of skin cancer).\u003c/p\u003e","description":"","filename":"4.png","url":"https://assets-eu.researchsquare.com/files/rs-7544969/v1/9639870b9c5cc6024cf4d7bc.png"},{"id":90897320,"identity":"aee4d986-b91d-43d3-b096-c647cb56fb63","added_by":"auto","created_at":"2025-09-09 11:40:53","extension":"png","order_by":5,"title":"Figure 5","display":"","copyAsset":false,"role":"figure","size":104162,"visible":true,"origin":"","legend":"\u003cp\u003eModel confidence boxplots for age, sex, and location domains across ID, HI, and UNN datasets. (0) non-malignant; and (1) malignant.\u003c/p\u003e","description":"","filename":"5.png","url":"https://assets-eu.researchsquare.com/files/rs-7544969/v1/2449c951a22e799eb5495459.png"},{"id":90895367,"identity":"390c8810-e36b-43b2-9d7d-7d56e556af42","added_by":"auto","created_at":"2025-09-09 11:32:53","extension":"png","order_by":6,"title":"Figure 6","display":"","copyAsset":false,"role":"figure","size":66203,"visible":true,"origin":"","legend":"\u003cp\u003eModel confidence boxplots for lesion diagnosis across ID, HI, and UNN datasets.\u003c/p\u003e","description":"","filename":"6.png","url":"https://assets-eu.researchsquare.com/files/rs-7544969/v1/987cc22100dc4211aaf3b224.png"},{"id":90895397,"identity":"31ca36c6-c343-4d07-8532-200e633f07f4","added_by":"auto","created_at":"2025-09-09 11:32:54","extension":"png","order_by":7,"title":"Figure 7","display":"","copyAsset":false,"role":"figure","size":70313,"visible":true,"origin":"","legend":"\u003cp\u003eModel confidence boxplots for Fitzpatrick skin type and family history of skin cancer domains across HI and UNN datasets.\u003c/p\u003e","description":"","filename":"7.png","url":"https://assets-eu.researchsquare.com/files/rs-7544969/v1/ad90cd8399c5fff86c835342.png"},{"id":90897752,"identity":"aacad1cc-bd1e-46ba-8eb6-e022d6eb1f53","added_by":"auto","created_at":"2025-09-09 11:48:59","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":1831073,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7544969/v1/702b81e3-643d-4c92-b7e7-8c792eb6f0a6.pdf"}],"financialInterests":"The authors declare no competing interests.","formattedTitle":"\u003cp\u003eOut-of-Distribution Performance Analysis of Skin Lesion Classifiers for dermoscopic images\u003c/p\u003e","fulltext":[{"header":"Introduction","content":"\u003cp\u003eAccording to the World Health Organization, skin cancer is one of the most frequently diagnosed malignancies worldwide [1]. In fact, in 2022, the incidence of skin cancer melanoma and non-melanoma was 331,722 and 1,234,533 cases, respectively, with corresponding mortality figures of 58,667 and 69,416 [2,3]. Early detection of skin lesions is crucial for improving prognosis, particularly in malignant cases. Traditional diagnostic workflows have relied on expert visual interpretation of dermoscopic images[4]. However, in recent years, there has been a notable shift toward artificial intelligence (AI)\u0026ndash;based methods for image classification [5,6]. These developments announce a transition to automated and assisted systems designed to enhance the objectivity and reproducibility of skin cancer diagnosis [7\u0026ndash;10].\u003c/p\u003e\u003cp\u003eAmong these AI techniques employed, convolutional neural networks (CNNs) are among the most widely used, particularly those relying on the fine-tuning of pre-trained models with architectures such as AlexNet, VGG, GoogLeNet, ResNet, Xception, DenseNet, MobileNet, or EfficientNet through transfer learning [7\u0026ndash;11]. The vast majority of these studies are trained and tested exclusively on public or commercial datasets. Only the works by Dorj \u003cem\u003eet al.\u003c/em\u003e [12], Mishra \u003cem\u003eet al.\u003c/em\u003e [13], and Masood \u003cem\u003eet al.\u003c/em\u003e[14] employ self-collected datasets. Nevertheless, a key limitation of these studies is that the models are trained and validated exclusively on their private datasets, which leads to the same issue observed in the rest of the studies, i.e., overfitting to the specific data.\u003c/p\u003e\u003cp\u003eThis issue underlines the importance of going beyond internal validation to truly assess the robustness of these models. Although AI models have made significant progress in the classification of skin lesions, they still rely heavily on the assumption that training and testing data are independent and identically distributed (IID) [15]. Moreover, these models have been shown to infer demographic information from medical images, potentially leading to biased predictions [16]. Therefore, it becomes essential to assess the generalization capability of classification models by evaluating their performance on previously unseen datasets, referred to as out-of-distribution (OOD) data [15].\u003c/p\u003e\u003cp\u003eTo the best of our knowledge, only two studies have addressed OOD assessment in the context of skin lesion classification. The study by Fogelberg \u003cem\u003eet al.\u003c/em\u003e [17] focuses on characterizing, quantifying, and clustering dermoscopic datasets to evaluate the limitations in clinical translation, highlighting the lack of publicly available datasets where such domain shifts are properly described and quantified. On the other hand, the study by Chamarthi \u003cem\u003eet al.\u003c/em\u003e [18] investigates the use of unsupervised domain adaptation methods to improve generalization across dermoscopic datasets. However, both studies restrict their evaluation to subsets of the publicly available ISIC (International Skin Imaging Collaboration) archive [19], without considering external or independent data sources.\u003c/p\u003e\u003cp\u003eConsidering the limitations associated with training and validating models on IID datasets, the present study aims to evaluate the generalization performance of four CNNs\u0026mdash;AlexNet, VGG, ResNet, and DenseNet\u0026mdash;for skin lesion classification. The models are trained and validated on three publicly available datasets (Derm7pt, ISIC-2020, and PH2), and their OOD performance is assessed on two independent private cohorts from the \u003cem\u003eHospital Italiano\u003c/em\u003e (Argentina) and the University Hospital of North Norway. Specifically, the study analyses: (1) the performance drop between the in-distribution (ID) training datasets and the OOD cohorts, and (2) the impact of clinical and demographic domain shifts\u0026mdash;namely age, sex, and lesion location\u0026mdash;on model generalization. These analyses aim to identify the scenarios in which the models exhibit the poorest performance and highlight the relevance of evaluating deep learning systems beyond traditional IID assumptions.\u003c/p\u003e"},{"header":"Methods","content":"\u003cp\u003eFigure \u003cspan refid=\"Fig1\" class=\"InternalRef\"\u003e1\u003c/span\u003e illustrates the overall methodology employed in this study. First, four CNNs are trained to differentiate between non-malignant and malignant skin lesions using images from three public datasets, and are also being tested on part of these datasets. To evaluate the capability of generalization of these models, an OOD analysis is conducted on two independent datasets not seen during training, also studying the similarity of their distributions with the ID dataset. This analysis is structured around domain shifts defined by biological factors, including patient age, sex, lesion location, and diagnosis, matching in ID and OOD datasets, and Fitzpatrick's skin type (obtained from the variables regarding natural hair color and skin reaction to sun), and family history only in OOD datasets.\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003cdiv id=\"Sec3\" class=\"Section2\"\u003e\u003ch2\u003eMaterials\u003c/h2\u003e\u003cdiv id=\"Sec4\" class=\"Section3\"\u003e\u003ch2\u003eIn-distribution dataset\u003c/h2\u003e\u003cp\u003eTo evaluate classification performance under OOD conditions, an ID dataset is constructed by combining three publicly available dermoscopic image datasets. These datasets were merged and subsequently split into 80% for training and 20% for testing, maintaining the original proportion of each source dataset across both subsets. The training dataset is subsequently used for training and validation. The content of each public dataset used is detailed below:\u003c/p\u003e\u003cp\u003e1. Derm7pt [20]. This dataset contains 2,022 dermoscopic images of skin lesions. For this study, 1,011 samples relevant to malignancy detection are selected. The resulting dataset includes 717 non-malignant and 294 malignant cases.\u003c/p\u003e\u003cp\u003e2. ISIC-2020 [19]. Provided by the International Skin Imaging Collaboration, this large-scale dataset includes dermoscopic images collected from various clinical centers. The ISIC-2020 subset used in this study originally contained 32,542 non-malignant images and 584 images labeled with melanoma, with image resolutions ranging from 640\u0026times;480 to 6000\u0026times;4000 pixels. After removing 434 duplicate entries and 26,188 images labelled as 'unknown', the dataset is reduced to 5,362 non-malignant images and 581 melanoma images.\u003c/p\u003e\u003cp\u003e3. PH2 [21]. The PH2 dataset consists of 200 high-resolution dermoscopic images collected at the Pedro Hispano Hospital in Matosinhos and the University of Porto, which have a resolution of 768\u0026times;560 pixels, and are stored as 8-bit RGB files.\u003c/p\u003e\u003cp\u003eTable\u0026nbsp;\u003cspan refid=\"Tab1\" class=\"InternalRef\"\u003e1\u003c/span\u003e summarizes the metadata of these datasets, including lesion location and diagnostic subtypes.\u003c/p\u003e\u003cp\u003e\u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab1\" border=\"1\"\u003e\u003ccaption language=\"En\"\u003e\u003cdiv class=\"CaptionNumber\"\u003eTable 1\u003c/div\u003e\u003cdiv class=\"CaptionContent\"\u003e\u003cp\u003eSummary of the ID metadata, including lesion location and diagnostic subtypes. N: non-malignant; M: malignant; and Ttl: total.\u003c/p\u003e\u003c/div\u003e\u003c/caption\u003e\u003ccolgroup cols=\"4\"\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c4\" colnum=\"4\"\u003e\u003c/div\u003e\u003cthead\u003e\u003ctr\u003e\u003cth align=\"left\" colname=\"c1\"\u003e\u003cp\u003eSet\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c2\"\u003e\u003cp\u003eLocations\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c3\"\u003e\u003cp\u003eDiagnosis\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c4\"\u003e\u003cp\u003eN:M(Ttl)\u003c/p\u003e\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003e\u003cb\u003eDerm7pt\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eabdomen, back, chest, lower limbs, buttocks, upper limbs, head/neck, acral\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e\u003cb\u003eB\u003c/b\u003e: nevi (blue, combined, congenital, dermal, recurrent, and Reed or Spitz), atypical nevi (Clark\u0026rsquo;s nevus), seborrheic keratosis, lentigo, vascular lesions, dermatofibroma, melanosis, and other miscellaneous types\u003c/p\u003e\u003cp\u003e\u003cb\u003eM\u003c/b\u003e: melanoma, basal cell carcinoma, and melanoma metastasis\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e717:294 (1011)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003e\u003cb\u003eISIC-2020\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003etorso, lower extremity, upper extremity, head/neck, palms/soles, oral/genital\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e\u003cb\u003eB\u003c/b\u003e: melanocytic nevus, seborrheic keratosis, lichenoid keratosis, and lentigo\u003c/p\u003e\u003cp\u003e\u003cb\u003eM\u003c/b\u003e: melanoma\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e5,362:581 (5943)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003e\u003cb\u003ePH2\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u0026nbsp;\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e\u003cb\u003eB\u003c/b\u003e: common nevi, and atypical nevi\u003c/p\u003e\u003cp\u003e\u003cb\u003eM\u003c/b\u003e: melanoma\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e160:40 (200)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/colgroup\u003e\u003c/table\u003e\u003c/div\u003e\u003c/p\u003e\u003c/div\u003e\u003c/div\u003e\n\u003ch3\u003eOut-of-distribution dataset\u003c/h3\u003e\n\u003cp\u003eTo evaluate the performance of the classification models beyond the ID dataset, two distinct OOD datasets were used: one introduced by Ricci \u003cem\u003eet al.\u003c/em\u003e [22] and one collected for the WARIFA (Watching the risk factors: Artificial intelligence and the prevention of chronic conditions) project [23]. Both are independently assessed.\u003c/p\u003e\u003cp\u003eThe dataset introduced by Ricci \u003cem\u003eet al.\u003c/em\u003e [22] comprises 1,270 dermoscopic images corresponding to 1,191 unique skin lesions from 584 patients, collected at \u003cem\u003eHospital Italiano\u003c/em\u003e (HI) in Argentina. The images were acquired using different video microscopes and camera systems, including FotoFinder and Scalar devices. It includes high-quality expert annotations, with 58.2% of lesions confirmed by biopsy, comparable to biopsy rates in other public datasets. In addition, clinical and demographic metadata are provided, such as age, sex, anatomical location, lesion diagnostic subtype, Fitzpatrick skin type, and personal and family history of skin cancer.\u003c/p\u003e\u003cp\u003eOn the other hand, the WARIFA dataset was collected by \u003cem\u003eUniversidad Las Palmas de Gran Canaria\u003c/em\u003e (ULPGC) at the University Hospital of North Norway (UNN), in collaboration with the Departments of Dermatology and Plastic Surgery, for the WARIFA project. Images were acquired using a Xiaomi Redmi 9A smartphone equipped with a DermLite H\u0026Uuml;D 2 dermoscope. All images underwent a visual inspection process, and those with poor or unrecoverable quality (e.g., excessive stray light or misalignment) were discarded. Then, images were manually cropped to 1,750 \u0026times; 1,750 pixels.\u003c/p\u003e\u003cp\u003eThe dataset includes 1,518 dermoscopic images from 60 patients, corresponding to 260 lesions and scars, 30 of which were histopathologically confirmed. The remaining cases were clinically validated by consensus among four dermatologists. All lesions were classified into non-malignant and malignant categories. Although scars from excisions were also documented, they were excluded from the present analysis to focus solely on primary skin lesions, resulting in a total of 216 lesions. As multiple images are available for each lesion, a quality-based selection is performed to retain only the most informative image per lesion. Images are scored using five equally weighted metrics (sharpness, noise, exposure, contrast, and blur), with quality-enhancing features increasing the score and noise/blur reducing it. For each lesion, the image with the highest overall score is selected. For each patient, detailed demographic and clinical metadata are available, including age, sex, height, weight, hair color, skin response to sun exposure, number of moles, presence of moles larger than 5 mm in diameter, history of sunburns, use of sunbeds, personal and family history of cancer and skin cancer, history of organ transplantation, and immunosuppressive status. Fitzpatrick skin type classification is obtained for each patient through the natural hair color and the skin response to the sun. Additionally, for each lesion, the metadata includes the anatomical location, diagnostic subtype, and size of the lesion.\u003c/p\u003e\u003cp\u003eThe different values for the characteristics also present in the ID dataset (location and diagnostic subtype) are shown in Table\u0026nbsp;\u003cspan refid=\"Tab2\" class=\"InternalRef\"\u003e2\u003c/span\u003e. Age and sex are not included since the former is a continuous variable and the latter is a categorical variable that can only take two values, respectively.\u003c/p\u003e\u003cp\u003e\u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab2\" border=\"1\"\u003e\u003ccaption language=\"En\"\u003e\u003cdiv class=\"CaptionNumber\"\u003eTable 2\u003c/div\u003e\u003cdiv class=\"CaptionContent\"\u003e\u003cp\u003eSummary of the OOD datasets metadata, including lesion location and diagnostic subtypes. N: non-malignant; M: malignant; and Ttl: total.\u003c/p\u003e\u003c/div\u003e\u003c/caption\u003e\u003ccolgroup cols=\"4\"\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c4\" colnum=\"4\"\u003e\u003c/div\u003e\u003cthead\u003e\u003ctr\u003e\u003cth align=\"left\" colname=\"c1\"\u003e\u003cp\u003eSet\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c2\"\u003e\u003cp\u003eLocations\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c3\"\u003e\u003cp\u003eDiagnosis\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c4\"\u003e\u003cp\u003eN:M(Ttl)\u003c/p\u003e\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003e\u003cb\u003eHI\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eanterior torso, posterior torso, lateral torso, lower extremity, upper extremity, head/neck, palms/soles, oral/genital\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e\u003cb\u003eB\u003c/b\u003e: nevus, seborrheic keratosis, lentigo, lichenoid keratosis, vascular lesion, dermatofibroma, and actinic keratosis\u003c/p\u003e\u003cp\u003e\u003cb\u003eM\u003c/b\u003e: melanoma, basal cell carcinoma, squamous cell carcinoma\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e737:533 (1270)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003e\u003cb\u003eUNN\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003etorso, back, legs, arms, face, head\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e\u003cb\u003eB\u003c/b\u003e: nevus, atypical nevus, seborrheic keratosis, vascular lesion, dermatofibroma, and actinic keratosis\u003c/p\u003e\u003cp\u003e\u003cb\u003eM\u003c/b\u003e: melanoma, basal cell carcinoma, squamous cell carcinoma\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e181:36 (217)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/colgroup\u003e\u003c/table\u003e\u003c/div\u003e\u003c/p\u003e\n\u003ch3\u003eDatasets pre-processing\u003c/h3\u003e\n\u003cp\u003eAll images undergo a standardized pre-processing pipeline that includes hair removal, lesion segmentation, and image normalization. The hair removal approach is based on the combination of the YCbCr color space, the Attention U-Net (Att-Net)-based hair segmentation model, and Aggregated Contextual-Transformation-Generative Adversarial Network (AOT-GAN)-based image inpainting, as described in [24]. Lesion segmentation is subsequently performed using a Double U-Net model [25]. Images are normalized per channel using ImageNet mean and standard deviation values.\u003c/p\u003e\u003cp\u003eTo evaluate the subsets on which the model generalizes better or worse, metadata common to both OOD datasets is retained (Table\u0026nbsp;\u003cspan refid=\"Tab3\" class=\"InternalRef\"\u003e3\u003c/span\u003e). Four of them are available for ID and both OOD datasets: patient age and gender (or sex), lesion location, and diagnostic subtype. Among the ID datasets, ISIC-2020 and Derm7pt contain all the listed metadata except for age, which is available only in ISIC-2020. PH2 includes only the diagnosis of the lesion. On the other hand, Fitzpatrick skin type and family history of skin cancer are only available in OOD datasets, making it impossible to compare them with the ID dataset.\u003c/p\u003e\u003cp\u003e\u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab3\" border=\"1\"\u003e\u003ccaption language=\"En\"\u003e\u003cdiv class=\"CaptionNumber\"\u003eTable 3\u003c/div\u003e\u003cdiv class=\"CaptionContent\"\u003e\u003cp\u003eDemographic and clinical summary by set and class. Mean and standard deviation for age, percentage of the total in its class, and set for the rest of the variables. Lbl: label; Ml: Male; F: Female; N: non-malignant, M: malignant, Ttl: total.\u003c/p\u003e\u003c/div\u003e\u003c/caption\u003e\u003ccolgroup cols=\"13\"\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c4\" colnum=\"4\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c5\" colnum=\"5\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c6\" colnum=\"6\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c7\" colnum=\"7\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c8\" colnum=\"8\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c9\" colnum=\"9\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c10\" colnum=\"10\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c11\" colnum=\"11\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c12\" colnum=\"12\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c13\" colnum=\"13\"\u003e\u003c/div\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd align=\"left\" colspan=\"2\" morerows=\"1\" nameend=\"c2\" namest=\"c1\" rowspan=\"2\"\u003e\u003cp\u003eSet\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\" morerows=\"1\" rowspan=\"2\"\u003e\u003cp\u003eLbl\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\" morerows=\"1\" rowspan=\"2\"\u003e\u003cp\u003eN\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\" morerows=\"1\" rowspan=\"2\"\u003e\u003cp\u003eAge\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colspan=\"2\" nameend=\"c7\" namest=\"c6\"\u003e\u003cp\u003eSex\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colspan=\"4\" nameend=\"c11\" namest=\"c8\"\u003e\u003cp\u003eFitzpatrick sky type\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colspan=\"2\" nameend=\"c13\" namest=\"c12\"\u003e\u003cp\u003eFamily hist.\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003eMl\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003eF\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c8\"\u003e\u003cp\u003eI\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c9\"\u003e\u003cp\u003eII\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c10\"\u003e\u003cp\u003eIII\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c11\"\u003e\u003cp\u003eIV\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c12\"\u003e\u003cp\u003eNo\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c13\"\u003e\u003cp\u003eYes\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\" morerows=\"5\" rowspan=\"6\"\u003e\u003cp\u003e\u003cb\u003eOOD\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\" morerows=\"2\" rowspan=\"3\"\u003e\u003cp\u003e\u003cb\u003eHI\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eN\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e737\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e48.52\u0026thinsp;\u0026plusmn;\u0026thinsp;17.35\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e42.39\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e57.61\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c8\"\u003e\u003cp\u003e6.02\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c9\"\u003e\u003cp\u003e59.49\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c10\"\u003e\u003cp\u003e30.72\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c11\"\u003e\u003cp\u003e3.77\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c12\"\u003e\u003cp\u003e77.52\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c13\"\u003e\u003cp\u003e22.48\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eM\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e533\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e69.66\u0026thinsp;\u0026plusmn;\u0026thinsp;13.90\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e51.98\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e48.02\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c8\"\u003e\u003cp\u003e11.42\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c9\"\u003e\u003cp\u003e80.16\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c10\"\u003e\u003cp\u003e8.42\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c11\"\u003e\u003cp\u003e0.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c12\"\u003e\u003cp\u003e20.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c13\"\u003e\u003cp\u003e80.00\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eTtl\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e1270\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e57.37\u0026thinsp;\u0026plusmn;\u0026thinsp;19.09\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e46.41\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e53.59\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c8\"\u003e\u003cp\u003e8.34\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c9\"\u003e\u003cp\u003e68.36\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c10\"\u003e\u003cp\u003e21.15\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c11\"\u003e\u003cp\u003e2.15\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c12\"\u003e\u003cp\u003e59.48\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c13\"\u003e\u003cp\u003e40.52\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c2\" morerows=\"2\" rowspan=\"3\"\u003e\u003cp\u003e\u003cb\u003eUNN\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eN\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e180\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e60.74\u0026thinsp;\u0026plusmn;\u0026thinsp;18.29\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e42.22\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e57.78\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c8\"\u003e\u003cp\u003e22.78\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c9\"\u003e\u003cp\u003e43.44\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c10\"\u003e\u003cp\u003e0.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c11\"\u003e\u003cp\u003e33.98\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c12\"\u003e\u003cp\u003e86.67\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c13\"\u003e\u003cp\u003e13.33\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eM\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e37\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e71.29\u0026thinsp;\u0026plusmn;\u0026thinsp;12.45\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e56.76\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e43.24\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c8\"\u003e\u003cp\u003e8.11\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c9\"\u003e\u003cp\u003e40.54\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c10\"\u003e\u003cp\u003e0.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c11\"\u003e\u003cp\u003e51.35\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c12\"\u003e\u003cp\u003e78.38\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c13\"\u003e\u003cp\u003e21.62\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eTtl\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e217\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e62.54\u0026thinsp;\u0026plusmn;\u0026thinsp;17.86\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e44.7\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e55.3\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c8\"\u003e\u003cp\u003e20.28\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c9\"\u003e\u003cp\u003e42.86\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c10\"\u003e\u003cp\u003e0.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c11\"\u003e\u003cp\u003e36.87\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c12\"\u003e\u003cp\u003e85.25\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c13\"\u003e\u003cp\u003e14.75\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\" morerows=\"5\" rowspan=\"6\"\u003e\u003cp\u003e\u003cb\u003eID\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\" morerows=\"2\" rowspan=\"3\"\u003e\u003cp\u003e\u003cb\u003eTest\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eN\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e1250\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e49.66\u0026thinsp;\u0026plusmn;\u0026thinsp;12.73\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e56.80\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e40.64\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c8\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c9\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c10\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c11\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c12\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c13\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eM\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e184\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e57.80\u0026thinsp;\u0026plusmn;\u0026thinsp;15.77\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e47.83\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e47.83\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c8\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c9\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c10\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c11\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c12\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c13\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eTtl\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e1434\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e50.46\u0026thinsp;\u0026plusmn;\u0026thinsp;13.27\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e56.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e42.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c8\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c9\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c10\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c11\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c12\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c13\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c2\" morerows=\"2\" rowspan=\"3\"\u003e\u003cp\u003e\u003cb\u003eTrain\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eN\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e4987\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e50.50\u0026thinsp;\u0026plusmn;\u0026thinsp;12.61\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e52.66\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e44.78\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c8\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c9\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c10\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c11\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c12\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c13\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eM\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e731\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e58.20\u0026thinsp;\u0026plusmn;\u0026thinsp;16.37\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e55.95\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e39.67\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c8\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c9\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c10\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c11\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c12\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c13\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eTtl\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e5718\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e51.25\u0026thinsp;\u0026plusmn;\u0026thinsp;13.22\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003e53.08\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c7\"\u003e\u003cp\u003e44.12\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c8\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c9\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c10\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c11\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c12\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c13\"\u003e\u003cp\u003e-\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/colgroup\u003e\u003c/table\u003e\u003c/div\u003e\u003c/p\u003e\u003cp\u003eTo ensure consistency across datasets, lesion locations are grouped into six generalized anatomical regions (see Table\u0026nbsp;\u003cspan refid=\"Tab4\" class=\"InternalRef\"\u003e4\u003c/span\u003e): torso (T), lower extremity (L_Ext), upper extremity (U_ext), head/neck (H/N), palms/soles (P/S), and oral/genital (O/G). Note that the UNN dataset does not contain lesions in the P/S or O/G regions. In some cases, original location labels were merged into broader categories to allow for consistent comparisons (see Table\u0026nbsp;\u003cspan refid=\"Tab1\" class=\"InternalRef\"\u003e1\u003c/span\u003e and Table\u0026nbsp;\u003cspan refid=\"Tab2\" class=\"InternalRef\"\u003e2\u003c/span\u003e). For example, in the HI dataset, the torso group includes anterior, lateral, and posterior torso.\u003c/p\u003e\u003cp\u003e\u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab4\" border=\"1\"\u003e\u003ccaption language=\"En\"\u003e\u003cdiv class=\"CaptionNumber\"\u003eTable 4\u003c/div\u003e\u003cdiv class=\"CaptionContent\"\u003e\u003cp\u003ePercentage distribution of anatomical location of lesions by group and dataset. N: non-malignant, M: malignant; Ttl: total.\u003c/p\u003e\u003c/div\u003e\u003c/caption\u003e\u003ccolgroup cols=\"10\"\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e\u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c4\" colnum=\"4\"\u003e\u003c/div\u003e\u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c5\" colnum=\"5\"\u003e\u003c/div\u003e\u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c6\" colnum=\"6\"\u003e\u003c/div\u003e\u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c7\" colnum=\"7\"\u003e\u003c/div\u003e\u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c8\" colnum=\"8\"\u003e\u003c/div\u003e\u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c9\" colnum=\"9\"\u003e\u003c/div\u003e\u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c10\" colnum=\"10\"\u003e\u003c/div\u003e\u003cthead\u003e\u003ctr\u003e\u003cth align=\"left\" colspan=\"2\" nameend=\"c2\" namest=\"c1\"\u003e\u003cp\u003eSet\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c3\"\u003e\u003cp\u003eLbl\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c4\"\u003e\u003cp\u003eN\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c5\"\u003e\u003cp\u003eT\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c6\"\u003e\u003cp\u003eL_ext\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c7\"\u003e\u003cp\u003eU_ext\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c8\"\u003e\u003cp\u003eH/N\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c9\"\u003e\u003cp\u003eP/S\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c10\"\u003e\u003cp\u003eO/G\u003c/p\u003e\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\" morerows=\"5\" rowspan=\"6\"\u003e\u003cp\u003e\u003cb\u003eOOD\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\" morerows=\"2\" rowspan=\"3\"\u003e\u003cp\u003e\u003cb\u003eHI\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eN\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e\u003cp\u003e737\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e\u003cp\u003e44.64\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e20.22\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e\u003cp\u003e10.18\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c8\"\u003e\u003cp\u003e11.80\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c9\"\u003e\u003cp\u003e1.49\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c10\"\u003e\u003cp\u003e0.68\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eM\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e\u003cp\u003e533\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e\u003cp\u003e26.83\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e17.64\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e\u003cp\u003e11.26\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c8\"\u003e\u003cp\u003e38.27\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c9\"\u003e\u003cp\u003e2.06\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c10\"\u003e\u003cp\u003e0.38\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eTtl\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e\u003cp\u003e1270\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e\u003cp\u003e37.17\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e19.13\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e\u003cp\u003e10.63\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c8\"\u003e\u003cp\u003e22.91\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c9\"\u003e\u003cp\u003e1.73\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c10\"\u003e\u003cp\u003e0.55\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c2\" morerows=\"2\" rowspan=\"3\"\u003e\u003cp\u003e\u003cb\u003eUNN\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eN\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e\u003cp\u003e179\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e\u003cp\u003e58.33\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e4.44\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e\u003cp\u003e21.11\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c8\"\u003e\u003cp\u003e12.78\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c9\"\u003e\u003cp\u003e0.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c10\"\u003e\u003cp\u003e0.00\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eM\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e\u003cp\u003e37\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e\u003cp\u003e48.65\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e2.70\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e\u003cp\u003e0.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c8\"\u003e\u003cp\u003e48.65\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c9\"\u003e\u003cp\u003e0.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c10\"\u003e\u003cp\u003e0.00\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eTtl\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e\u003cp\u003e217\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e\u003cp\u003e56.68\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e4.15\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e\u003cp\u003e17.51\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c8\"\u003e\u003cp\u003e18.89\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c9\"\u003e\u003cp\u003e0.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c10\"\u003e\u003cp\u003e0.00\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\" morerows=\"5\" rowspan=\"6\"\u003e\u003cp\u003e\u003cb\u003eID\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\" morerows=\"2\" rowspan=\"3\"\u003e\u003cp\u003e\u003cb\u003eTest\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eN\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e\u003cp\u003e1250\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e\u003cp\u003e57.12\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e24.56\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e\u003cp\u003e11.12\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c8\"\u003e\u003cp\u003e3.68\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c9\"\u003e\u003cp\u003e0.88\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c10\"\u003e\u003cp\u003e0.08\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eM\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e\u003cp\u003e184\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e\u003cp\u003e39.67\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e21.20\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e\u003cp\u003e20.11\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c8\"\u003e\u003cp\u003e11.96\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c9\"\u003e\u003cp\u003e0.54\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c10\"\u003e\u003cp\u003e1.09\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eTtl\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e\u003cp\u003e1434\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e\u003cp\u003e54.88\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e24.13\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e\u003cp\u003e12.27\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c8\"\u003e\u003cp\u003e4.74\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c9\"\u003e\u003cp\u003e0.84\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c10\"\u003e\u003cp\u003e0.21\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c2\" morerows=\"2\" rowspan=\"3\"\u003e\u003cp\u003e\u003cb\u003eTrain\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eN\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e\u003cp\u003e4987\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e\u003cp\u003e54.90\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e26.47\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e\u003cp\u003e11.13\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c8\"\u003e\u003cp\u003e3.79\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c9\"\u003e\u003cp\u003e1.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c10\"\u003e\u003cp\u003e0.14\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eM\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e\u003cp\u003e731\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e\u003cp\u003e43.91\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e22.02\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e\u003cp\u003e14.77\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c8\"\u003e\u003cp\u003e12.59\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c9\"\u003e\u003cp\u003e0.96\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c10\"\u003e\u003cp\u003e0.41\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eTtl\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e\u003cp\u003e5718\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e\u003cp\u003e53.50\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e25.90\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e\u003cp\u003e11.59\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c8\"\u003e\u003cp\u003e4.91\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c9\"\u003e\u003cp\u003e1.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c10\"\u003e\u003cp\u003e0.17\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/colgroup\u003e\u003c/table\u003e\u003c/div\u003e\u003c/p\u003e\u003cp\u003eRegarding lesion diagnostic subtype, lesions are categorized into: nevus (NEV), atypical nevus (ATY), seborrheic keratosis (SK), actinic keratosis (AK), dermatofibroma (DFB), vascular lesion (VASC), and lichenoid keratosis (LK) for the non-malignant class; and melanoma (MEL), basal cell carcinoma (BCC), and squamous cell carcinoma (SCC) for the malignant class. The frequency of each subtype across datasets is shown in Table\u0026nbsp;\u003cspan refid=\"Tab5\" class=\"InternalRef\"\u003e5\u003c/span\u003e. Some subtypes present in the ID dataset do not appear in the OOD datasets and are labeled as 'Others'. Conversely, AK and SCC are not represented in the ID dataset.\u003c/p\u003e\u003cp\u003e\u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab5\" border=\"1\"\u003e\u003ccaption language=\"En\"\u003e\u003cdiv class=\"CaptionNumber\"\u003eTable 5\u003c/div\u003e\u003cdiv class=\"CaptionContent\"\u003e\u003cp\u003ePercentage distribution of diagnostic subtypes of lesions by group (non-malignant and malignant) and dataset. N: non-malignant; M: malignant.\u003c/p\u003e\u003c/div\u003e\u003c/caption\u003e\u003ccolgroup cols=\"6\"\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c4\" colnum=\"4\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c5\" colnum=\"5\"\u003e\u003c/div\u003e\u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c6\" colnum=\"6\"\u003e\u003c/div\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd align=\"left\" colspan=\"2\" morerows=\"1\" nameend=\"c2\" namest=\"c1\" rowspan=\"2\"\u003e\u003cp\u003eDiagnosis\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colspan=\"2\" nameend=\"c4\" namest=\"c3\"\u003e\u003cp\u003eOOD\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colspan=\"2\" nameend=\"c6\" namest=\"c5\"\u003e\u003cp\u003eID\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eHI\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003eUNN\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003eTEST\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c6\"\u003e\u003cp\u003eTRAIN\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\" morerows=\"8\" rowspan=\"9\"\u003e\u003cp\u003e\u003cb\u003eN\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e\u003cb\u003eNEV\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e74.49\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e43.33\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e85.44\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e85.28\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e\u003cb\u003eATY\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e0.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e4.44\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e6.40\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e6.40\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e\u003cb\u003eSK\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e6.38\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e43.89\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e2.80\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e2.81\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e\u003cb\u003eLEN\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e1.90\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e1.20\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e1.20\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e\u003cb\u003eLK\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e0.14\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e0.40\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e0.54\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e\u003cb\u003eVASC\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e5.56\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e2.22\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e0.48\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e0.46\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e\u003cb\u003eDFB\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e5.29\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e1.11\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e0.32\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e0.32\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e\u003cb\u003eAK\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e6.24\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e4.44\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e0.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e0.00\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e\u003cb\u003eOthers\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e0.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e0.40\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e0.38\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\" morerows=\"3\" rowspan=\"4\"\u003e\u003cp\u003e\u003cb\u003eM\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e\u003cb\u003eMEL\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e36.40\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e10.81\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e95.11\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e94.94\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e\u003cb\u003eBCC\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e42.78\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e78.38\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e4.35\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e4.65\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e\u003cb\u003eSCC\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e20.83\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e10.81\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e0.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e0.00\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003e\u003cb\u003eOthers\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e0.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c5\"\u003e\u003cp\u003e0.54\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e0.41\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/colgroup\u003e\u003c/table\u003e\u003c/div\u003e\u003c/p\u003e\n\u003ch3\u003eSubgroup definitions based on biological factors\u003c/h3\u003e\n\u003cp\u003eTo explore the robustness and reliability of the models across patient subpopulations, biologically meaningful subgroups based on age, sex, lesion location, and diagnosis are defined. The ID dataset used for training contains instances representing most of these subgroups (as seen in Table\u0026nbsp;\u003cspan refid=\"Tab3\" class=\"InternalRef\"\u003e3\u003c/span\u003e, Table\u0026nbsp;\u003cspan refid=\"Tab4\" class=\"InternalRef\"\u003e4\u003c/span\u003e, and Table\u0026nbsp;\u003cspan refid=\"Tab5\" class=\"InternalRef\"\u003e5\u003c/span\u003e). Notably, technical shifts exist between the ID and OOD datasets (HI and UNN), as images were acquired using different dermatoscopic devices and imaging protocols. These OOD datasets thus serve as external validation sources, allowing assessment of model performance under both biological and technical distribution shifts.\u003c/p\u003e\u003cp\u003eFurthermore, Fitzpatrick skin type and family history of skin cancer, although potentially relevant biological variables, are only available in the OOD datasets. As a result, subgroup performance comparisons based on these variables are restricted to OOD datasets. In contrast, all other biologically defined subgroups are evaluated across both ID and OOD domains. A complete summary of the subgroups and their distribution is provided in Table\u0026nbsp;\u003cspan refid=\"Tab6\" class=\"InternalRef\"\u003e6\u003c/span\u003e.\u003c/p\u003e\u003cp\u003e\u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab6\" border=\"1\"\u003e\u003ccaption language=\"En\"\u003e\u003cdiv class=\"CaptionNumber\"\u003eTable 6\u003c/div\u003e\u003cdiv class=\"CaptionContent\"\u003e\u003cp\u003eDomain shifts defined by biological factors for two OOD data sources (HI and UNN).\u003c/p\u003e\u003c/div\u003e\u003c/caption\u003e\u003ccolgroup cols=\"4\"\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c4\" colnum=\"4\"\u003e\u003c/div\u003e\u003cthead\u003e\u003ctr\u003e\u003cth align=\"left\" colname=\"c1\" morerows=\"1\" rowspan=\"2\"\u003e\u003cp\u003eShift name\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c2\" morerows=\"1\" rowspan=\"2\"\u003e\u003cp\u003eBiological Factor\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colspan=\"2\" nameend=\"c4\" namest=\"c3\"\u003e\u003cp\u003eNon-Malignant:Malignant (Total)\u003c/p\u003e\u003c/th\u003e\u003c/tr\u003e\u003ctr\u003e\u003cth align=\"left\" colname=\"c3\"\u003e\u003cp\u003eSource\u0026thinsp;=\u0026thinsp;HI\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c4\"\u003e\u003cp\u003eSource\u0026thinsp;=\u0026thinsp;UNN\u003c/p\u003e\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eAU\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eAge\u0026thinsp;\u0026le;\u0026thinsp;30\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e122:9 (131)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e21:0 (21)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eAB\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eAge = (30, 60]\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e440:118 (558)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e53:10 (63)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eAO\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eAge\u0026thinsp;\u0026gt;\u0026thinsp;60\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e172:405 (577)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e105:27 (132)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eSM\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eSex\u0026thinsp;=\u0026thinsp;Male\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e312:276 (588)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e76:21 (97)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eSF\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eSex\u0026thinsp;=\u0026thinsp;Female\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e424:255 (679)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e103:16 (119)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eLT\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eLocation\u0026thinsp;=\u0026thinsp;Torso\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e329:143 (472)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e105:18 (123)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eLL\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eLocation\u0026thinsp;=\u0026thinsp;Lower extremity\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e149:94 (243)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e7:1 (8)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eLU\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eLocation\u0026thinsp;=\u0026thinsp;Upper extremity\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e75:60 (135)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e38:0 (38)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eLH\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eLocation\u0026thinsp;=\u0026thinsp;Head/Neck\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e87:304 (291)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e23:18 (41)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eLP\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eLocation\u0026thinsp;=\u0026thinsp;Palms/Soles\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e11:11 (22)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0:0 (0)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eLO\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eLocation\u0026thinsp;=\u0026thinsp;Oral/Genital\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e5:2 (7)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0:0 (0)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eDN\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eDiagnosis\u0026thinsp;=\u0026thinsp;NEV\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e549:0 (549)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e78:0 (78)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eDA\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eDiagnosis\u0026thinsp;=\u0026thinsp;ATY\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e0:0 (0)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e8:0 (8)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eDS\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eDiagnosis\u0026thinsp;=\u0026thinsp;SK\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e47:0 (47)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e79:0 (79)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eDL\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eDiagnosis\u0026thinsp;=\u0026thinsp;LEN\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e14:0 (14)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0:0 (0)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eDLk\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eDiagnosis\u0026thinsp;=\u0026thinsp;LK\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e1:0 (1)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0:0 (0)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eDV\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eDiagnosis\u0026thinsp;=\u0026thinsp;VASC\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e41:0 (41)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e4:0 (4)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eDD\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eDiagnosis\u0026thinsp;=\u0026thinsp;DFB\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e39:0 (39)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e2:0 (2)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eDAk\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eDiagnosis\u0026thinsp;=\u0026thinsp;AK\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e46:0 (46)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e8:0 (8)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eDM\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eDiagnosis\u0026thinsp;=\u0026thinsp;MEL\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e0:194 (194)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0:4 (4)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eDB\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eDiagnosis\u0026thinsp;=\u0026thinsp;BCC\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e0:228 (228)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0:29 (29)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eDSc\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eDiagnosis\u0026thinsp;=\u0026thinsp;SCC\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e0:111 (111)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0:4 (4)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eFI\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eFitzpatrick\u0026thinsp;=\u0026thinsp;I\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e40:57 (97)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e40:3 (43)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eFII\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eFitzpatrick\u0026thinsp;=\u0026thinsp;II\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e395:400 (795)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e78:15 (93)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eFIII\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eFitzpatrick\u0026thinsp;=\u0026thinsp;III\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e204:42 (246)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e0:0 (0)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eFIV\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eFitzpatrick\u0026thinsp;=\u0026thinsp;IV\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e25:0 (25)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e61:19 (80)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eHN\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eFamily history\u0026thinsp;=\u0026thinsp;No\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e407:48 (455)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e155:29 (184)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eHY\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eFamily history\u0026thinsp;=\u0026thinsp;Yes\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003e118:192 (310)\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003e24:8 (32)\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/colgroup\u003e\u003c/table\u003e\u003c/div\u003e\u003c/p\u003e\u003cdiv id=\"Sec8\" class=\"Section2\"\u003e\u003ch2\u003eDistributional similarity analysis\u003c/h2\u003e\u003cp\u003eTo assess the distributional differences between the ID dataset and the two OOD datasets, common variables are compared: age, sex, location, and diagnostic subtype. For each domain, the divergence between the ID and each OOD dataset is quantified using three metrics: Kullback\u0026ndash;Leibler (KL) divergence [26], Jensen\u0026ndash;Shannon (JS) divergence [27,28], and Cosine similarity [29]. Lower values indicate greater similarity for KL and JS divergences (with optimal values closest to 0), while higher values (closer to 1) indicate greater similarity for Cosine similarity.\u003c/p\u003e\u003cp\u003eSpecifically, for each variable, the distributions in the ID dataset are compared against those in the two OOD datasets independently. These metrics provide complementary perspectives on how similar or different the variable distributions are across test datasets.\u003c/p\u003e\u003c/div\u003e\n\u003ch3\u003eSkin lesion classifiers\u003c/h3\u003e\n\u003cp\u003eFor the classification task, multiple pre-trained CNNs are implemented and trained, including AlexNet [30], VGG [31], ResNet [32], and DenseNet [33]. The specific versions for the last three are VGG16, ResNet50, and DenseNet121. These architectures were selected because they represent different milestones in the evolution of CNN design, offering complementary characteristics: AlexNet introduced deep CNNs into large-scale image recognition; VGG16 provides a deeper yet uniform architecture with small convolutional filters; ResNet50 incorporates residual connections to overcome vanishing gradient problems and improve training of very deep networks; and DenseNet121 exploits dense connectivity to enhance feature propagation and parameter efficiency. Prior studies on dermoscopic image classification have reported competitive performance with these architectures [7\u0026ndash;10], making them suitable benchmarks to assess robustness under distribution shifts.\u003c/p\u003e\u003cp\u003eA five-subset training procedure is employed. In each subset, the training set, the one that is previously separated from the test data set, is further divided into 80% for training and 20% for validation, using a different random seed for each split to ensure variability. For every subset, a new training process is performed independently, always starting from the same pre-trained model, without transferring knowledge from the previous runs. To mitigate the class imbalance between non-malignant and malignant lesions, an undersampling strategy is applied to the training data in each fold. No additional image augmentation or regularisation techniques are applied.\u003c/p\u003e\u003cp\u003eEach model is trained with a maximum of 1000 epochs using an early stopping strategy with a patience of 50 epochs. Hyperparameters are tuned on the validation set, specifically the batch size (BS) with values of 4, 8, or 16 and the learning rate (LR) with values of 10\u003csup\u003e\u0026minus;\u0026thinsp;5\u003c/sup\u003e, 10\u003csup\u003e\u0026minus;\u0026thinsp;4\u003c/sup\u003e, 10\u003csup\u003e\u0026minus;\u0026thinsp;3\u003c/sup\u003e, or 10\u003csup\u003e\u0026minus;\u0026thinsp;2\u003c/sup\u003e, selecting the configuration that yields the best performance. Training is performed using the Adam optimizer with default parameters.\u003c/p\u003e\u003cp\u003eModel performance is assessed using standard evaluation metrics: accuracy, F1-score, sensitivity, specificity, and area under the receiver operating characteristic curve (AUROC) [34,35]. The model achieving the best validation performance in each fold is then evaluated on the ID test set as well as on both OOD datasets to assess generalization.\u003c/p\u003e\n\u003ch3\u003eOut-of-distribution analysis\u003c/h3\u003e\n\u003cp\u003eIn addition to the overall performance evaluation, the ability to generalize of the model is assessed for each domain shift defined in the OOD datasets. For variables shared between the ID and OOD datasets (age, sex, lesion location, and diagnostic subtype), model performance on OOD datasets (HI and UNN) is compared directly to the ID test subset. For variables exclusive to the OOD datasets (Fitzpatrick skin type and family history of skin cancer), performance comparisons are conducted between HI and UNN only, since these variables are not available in the ID dataset.\u003c/p\u003e\u003cp\u003eFinally, model confidence is analyzed by examining the predicted probability for the malignant class across domains. To visualize differences in confidence across subgroups, boxplots are generated showing the distribution of predicted probabilities for each domain shift.\u003c/p\u003e"},{"header":"Results","content":"\u003cdiv id=\"Sec12\" class=\"Section2\"\u003e\n \u003ch2\u003eDistributional similarity analysis\u003c/h2\u003e\n \u003cp\u003eTable \u003cspan class=\"InternalRef\"\u003e7\u003c/span\u003e presents the distributional similarity between the ID dataset and the two OOD datasets (HI and UNN) across the biologically defined domains listed in Table\u0026nbsp;\u003cspan class=\"InternalRef\"\u003e6\u003c/span\u003e. Similarity is evaluated using KL, JS, and Cosine similarity metrics. Domains with JS\u0026thinsp;\u0026gt;\u0026thinsp;0.05 and Cosine similarity\u0026thinsp;\u0026lt;\u0026thinsp;0.9 are considered to exhibit notable distributional shifts.\u003c/p\u003e\n \u003cdiv class=\"gridtable\"\u003e\n \u003ctable id=\"Tab7\" border=\"1\"\u003e\n \u003ccaption language=\"En\"\u003e\n \u003cdiv class=\"CaptionNumber\"\u003eTable 7\u003c/div\u003e\n \u003cdiv class=\"CaptionContent\"\u003e\n \u003cp\u003eJensen-Shannon (JS), Kullback-Leibler (KL), and Cosine similarity between HI/UNN and ID domains across biological factors. KL and JS values over 0.05 and cosine similarity values under 0.9 are marked in italics.\u003c/p\u003e\n \u003c/div\u003e\n \u003c/caption\u003e\n \u003cthead\u003e\n \u003ctr\u003e\n \u003cth align=\"left\" rowspan=\"2\"\u003e\n \u003cp\u003eDomain\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\" colspan=\"3\"\u003e\n \u003cp\u003eHI vs ID\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\" colspan=\"3\"\u003e\n \u003cp\u003eUNN vs ID\u003c/p\u003e\n \u003c/th\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eKL\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eJS\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eCosine\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eKL\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eJS\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eCosine\u003c/p\u003e\n \u003c/th\u003e\n \u003c/tr\u003e\n \u003c/thead\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eAU\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.011\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.003\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.999\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.037\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.011\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.997\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eAB\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.056\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.014\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.948\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.274\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.066\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.774\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eAO\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.207\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.056\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.870\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.452\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.118\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.675\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eSM\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.005\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.001\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.999\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.122\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.021\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.994\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eSF\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.029\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.007\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.972\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.038\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.010\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.963\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eLT\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.065\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.016\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.940\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.001\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.000\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.999\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eLL\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.008\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.002\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.997\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.249\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.045\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.965\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eLU\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.001\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.000\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e1.000\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.011\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.003\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.997\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eLH\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.127\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.037\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.972\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.087\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.025\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.984\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eLP\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.003\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.001\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e1.000\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.145\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.003\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e1.000\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eLO\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.001\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.000\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e1.000\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.033\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.001\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e1.000\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eDN\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.200\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.051\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.831\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.307\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.077\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.746\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eDA\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.172\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.020\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.998\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.004\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.001\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e1.000\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eDS\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.003\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.001\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e1.000\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.351\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.107\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.880\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eDL\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.000\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.000\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e1.000\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.183\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.004\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e1.000\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eDLk\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.003\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.000\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e1.000\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.057\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.001\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e1.000\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eDV\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.020\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.006\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e1.000\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.008\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.002\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e1.000\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eDD\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.022\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.007\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e1.000\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.003\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.001\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e1.000\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eDAk\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.037\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.013\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.999\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.038\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.013\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.999\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eDB\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.172\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.056\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.978\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.119\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.039\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.989\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eDSc\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cem\u003e0.091\u003c/em\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.031\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.995\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.019\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.006\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e1.000\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n \u003c/table\u003e\n \u003c/div\u003e\n \u003cp\u003eIn general, most subgroup distributions are relatively consistent across datasets, with JS values close to 0 and cosine similarity near 1. However, noticeable distribution shifts are observed in specific subgroups. For age-based subgroups, the largest differences are observed in older patient groups (AO). For this domain, the JS divergence reaches 0.056 (HI) and 0.118 (UNN), with Cosine similarity values of 0.870 and 0.675, respectively, indicating a substantial distributional shift, particularly for UNN. Regarding sex, both male (SM) and female (SF) subgroups show low divergence overall. However, the SM domain in UNN presents a slightly elevated KL divergence of 0.122, suggesting a minor shift in male representation. For the location, none of the domains obtain values of JS\u0026thinsp;\u0026gt;\u0026thinsp;0.05 or Cosine similarity\u0026thinsp;\u0026lt;\u0026thinsp;0.9. The largest shifts are observed in LH (head/neck) and LL (lower extremity) for UNN, with JS values of 0.025 and 0.045, respectively. These suggest some shift in the location distributions. Finally, several lesion diagnoses show stronger divergence. The DN domain (nevus) exhibits scores of 0.051 and 0.077 for both HI and UNN, respectively, with cosine similarities of 0.831 and 0.746, indicating substantial distribution differences. A similar trend for DS is observed in the UNN dataset, with JS of 0.107 and cosine of 0.880. For the malignant diagnostic subtypes, DB also shows a moderate divergence (JS\u0026thinsp;=\u0026thinsp;0.056 for HI, 0.039 for UNN). Interestingly, DB shows an unusually high KL of 0.172 between HI and ID but very low JS and high cosine similarity, suggesting a spike in frequency rather than a broad distributional shift.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv id=\"Sec13\" class=\"Section2\"\u003e\n \u003ch2\u003ePerformance evaluation\u003c/h2\u003e\n \u003cp\u003eTable \u003cspan class=\"InternalRef\"\u003e8\u003c/span\u003e presents the classification performance results for the ID test set, as well as for the two OOD datasets, HI and UNN. The best performing model is found to be the VGG-based model with a BS of 8 and a LR of 10\u003csup\u003e\u0026minus;\u0026thinsp;5\u003c/sup\u003e. Among the five subsets conducted with this configuration, the one with the highest performance is retained for the subsequent OOD analysis. In the ID test set, the VGG model achieved the best overall performance, with the following metrics: accuracy\u0026thinsp;=\u0026thinsp;0.833, F1-score\u0026thinsp;=\u0026thinsp;0.724, sensitivity\u0026thinsp;=\u0026thinsp;0.790, specificity\u0026thinsp;=\u0026thinsp;0.840, and AUROC\u0026thinsp;=\u0026thinsp;0.895. The only exception is sensitivity, for which the AlexNet model outperformed VGG, achieving a value of 0.814. In the OOD datasets, the DenseNet model shows the highest values for accuracy (HI\u0026thinsp;=\u0026thinsp;0.670, UNN\u0026thinsp;=\u0026thinsp;0.588), F1-score (HI\u0026thinsp;=\u0026thinsp;0.666, UNN\u0026thinsp;=\u0026thinsp;0.541), and specificity (HI\u0026thinsp;=\u0026thinsp;0.637, UNN\u0026thinsp;=\u0026thinsp;0.546). However, the best sensitivity in the HI set is achieved by the ResNet model (0.714), whereas in the UNN set, the AlexNet model obtains the highest (0.887), as in the ID set. Notably, the selected VGG16 model maintained balanced performance across all metrics in both OOD datasets, with all values exceeding 0.5, an outcome that is only matched by the DenseNet model. Finally, concerning the AUROC metric, the VGG model outperformed the other architectures in both OOD datasets, achieving values of 0.708 (HI) and 0.730 (UNN). When comparing OOD results with those obtained on the ID dataset, the VGG16 model exhibited a relative performance drop in the OOD datasets. Specifically, this corresponds to a decrease of 9.8%, 11.5%, and 20.9% in F1-score, sensitivity, and AUROC, respectively, for the HI dataset, and a reduction of 28.3%, 2.2%, and 18.4% for the UNN dataset.\u003c/p\u003e\n \u003cdiv class=\"gridtable\"\u003e\n \u003ctable id=\"Tab8\" border=\"1\"\u003e\n \u003ccaption language=\"En\"\u003e\n \u003cdiv class=\"CaptionNumber\"\u003eTable 8\u003c/div\u003e\n \u003cdiv class=\"CaptionContent\"\u003e\n \u003cp\u003ePerformance metrics for different architectures and sets: test of ID dataset, and both OOD datasets, i.e., HI and UNN. The highest value for the metric and set among the four possible architectures is shown in bold.\u003c/p\u003e\n \u003c/div\u003e\n \u003c/caption\u003e\n \u003cthead\u003e\n \u003ctr\u003e\n \u003cth align=\"left\"\u003e\u0026nbsp;\u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eBS\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eLR\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eSet\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eAccuracy\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eF1-Score\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eSensitivity\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eSpecificity\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eAUROC\u003c/p\u003e\n \u003c/th\u003e\n \u003c/tr\u003e\n \u003c/thead\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\" rowspan=\"3\"\u003e\n \u003cp\u003eAlexNet\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\" rowspan=\"3\"\u003e\n \u003cp\u003e8\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\" rowspan=\"3\"\u003e\n \u003cp\u003e10\u003csup\u003e\u0026minus;\u0026thinsp;4\u003c/sup\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eID\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.740\u0026thinsp;\u0026plusmn;\u0026thinsp;0.016\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.638\u0026thinsp;\u0026plusmn;\u0026thinsp;0.012\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cstrong\u003e0.814\u0026thinsp;\u0026plusmn;\u0026thinsp;0.032\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.729\u0026thinsp;\u0026plusmn;\u0026thinsp;0.022\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.838\u0026thinsp;\u0026plusmn;\u0026thinsp;0.020\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eHI\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.410\u0026thinsp;\u0026plusmn;\u0026thinsp;0.069\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.400\u0026thinsp;\u0026plusmn;\u0026thinsp;0.074\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.600\u0026thinsp;\u0026plusmn;\u0026thinsp;0.052\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.272\u0026thinsp;\u0026plusmn;\u0026thinsp;0.128\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.483\u0026thinsp;\u0026plusmn;\u0026thinsp;0.062\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eUNN\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.336\u0026thinsp;\u0026plusmn;\u0026thinsp;0.101\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.328\u0026thinsp;\u0026plusmn;\u0026thinsp;0.093\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cstrong\u003e0.887\u0026thinsp;\u0026plusmn;\u0026thinsp;0.077\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.223\u0026thinsp;\u0026plusmn;\u0026thinsp;0.135\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.645\u0026thinsp;\u0026plusmn;\u0026thinsp;0.017\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\" rowspan=\"3\"\u003e\n \u003cp\u003eVGG\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\" rowspan=\"3\"\u003e\n \u003cp\u003e8\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\" rowspan=\"3\"\u003e\n \u003cp\u003e10\u003csup\u003e\u0026minus;\u0026thinsp;5\u003c/sup\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eID\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cstrong\u003e0.833\u0026thinsp;\u0026plusmn;\u0026thinsp;0.012\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cstrong\u003e0.724\u0026thinsp;\u0026plusmn;\u0026thinsp;0.011\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.790\u0026thinsp;\u0026plusmn;\u0026thinsp;0.019\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cstrong\u003e0.840\u0026thinsp;\u0026plusmn;\u0026thinsp;0.017\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cstrong\u003e0.895\u0026thinsp;\u0026plusmn;\u0026thinsp;0.009\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eHI\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.655\u0026thinsp;\u0026plusmn;\u0026thinsp;0.042\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.653\u0026thinsp;\u0026plusmn;\u0026thinsp;0.040\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.699\u0026thinsp;\u0026plusmn;\u0026thinsp;0.015\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.624\u0026thinsp;\u0026plusmn;\u0026thinsp;0.079\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cstrong\u003e0.708\u0026thinsp;\u0026plusmn;\u0026thinsp;0.026\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eUNN\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.563\u0026thinsp;\u0026plusmn;\u0026thinsp;0.067\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.519\u0026thinsp;\u0026plusmn;\u0026thinsp;0.046\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.773\u0026thinsp;\u0026plusmn;\u0026thinsp;0.073\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.521\u0026thinsp;\u0026plusmn;\u0026thinsp;0.093\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cstrong\u003e0.730\u0026thinsp;\u0026plusmn;\u0026thinsp;0.030\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\" rowspan=\"3\"\u003e\n \u003cp\u003eResNet\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\" rowspan=\"3\"\u003e\n \u003cp\u003e8\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\" rowspan=\"3\"\u003e\n \u003cp\u003e10\u003csup\u003e\u0026minus;\u0026thinsp;5\u003c/sup\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eID\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.743\u0026thinsp;\u0026plusmn;\u0026thinsp;0.015\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.627\u0026thinsp;\u0026plusmn;\u0026thinsp;0.018\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.723\u0026thinsp;\u0026plusmn;\u0026thinsp;0.056\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.746\u0026thinsp;\u0026plusmn;\u0026thinsp;0.016\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.793\u0026thinsp;\u0026plusmn;\u0026thinsp;0.038\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eHI\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.626\u0026thinsp;\u0026plusmn;\u0026thinsp;0.021\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.625\u0026thinsp;\u0026plusmn;\u0026thinsp;0.022\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cstrong\u003e0.714\u0026thinsp;\u0026plusmn;\u0026thinsp;0.043\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.562\u0026thinsp;\u0026plusmn;\u0026thinsp;0.036\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.653\u0026thinsp;\u0026plusmn;\u0026thinsp;0.041\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eUNN\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.531\u0026thinsp;\u0026plusmn;\u0026thinsp;0.037\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.499\u0026thinsp;\u0026plusmn;\u0026thinsp;0.024\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.822\u0026thinsp;\u0026plusmn;\u0026thinsp;0.073\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.472\u0026thinsp;\u0026plusmn;\u0026thinsp;0.058\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.654\u0026thinsp;\u0026plusmn;\u0026thinsp;0.043\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\" rowspan=\"3\"\u003e\n \u003cp\u003eDenseNet\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\" rowspan=\"3\"\u003e\n \u003cp\u003e4\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\" rowspan=\"3\"\u003e\n \u003cp\u003e10\u003csup\u003e\u0026minus;\u0026thinsp;5\u003c/sup\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eID\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.803\u0026thinsp;\u0026plusmn;\u0026thinsp;0.032\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.683\u0026thinsp;\u0026plusmn;\u0026thinsp;0.021\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.722\u0026thinsp;\u0026plusmn;\u0026thinsp;0.068\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.816\u0026thinsp;\u0026plusmn;\u0026thinsp;0.046\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.820\u0026thinsp;\u0026plusmn;\u0026thinsp;0.034\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eHI\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cstrong\u003e0.670\u0026thinsp;\u0026plusmn;\u0026thinsp;0.033\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cstrong\u003e0.666\u0026thinsp;\u0026plusmn;\u0026thinsp;0.032\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.714\u0026thinsp;\u0026plusmn;\u0026thinsp;0.080\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cstrong\u003e0.637\u0026thinsp;\u0026plusmn;\u0026thinsp;0.097\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.695\u0026thinsp;\u0026plusmn;\u0026thinsp;0.019\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eUNN\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cstrong\u003e0.588\u0026thinsp;\u0026plusmn;\u0026thinsp;0.072\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cstrong\u003e0.541\u0026thinsp;\u0026plusmn;\u0026thinsp;0.052\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.795\u0026thinsp;\u0026plusmn;\u0026thinsp;0.059\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e\u003cstrong\u003e0.546\u0026thinsp;\u0026plusmn;\u0026thinsp;0.097\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.684\u0026thinsp;\u0026plusmn;\u0026thinsp;0.039\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n \u003c/table\u003e\n \u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv id=\"Sec14\" class=\"Section2\"\u003e\n \u003ch2\u003eOut-of-distribution Analysis\u003c/h2\u003e\n \u003cp\u003eAs mentioned above, for OOD analysis, both the difference in performance and the reliability of the prediction are evaluated. Furthermore, this evaluation is performed on both the variables present in both ID and OOD, as well as on the variables present only in OOD.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv id=\"Sec15\" class=\"Section2\"\u003e\n \u003ch2\u003ePerformance evaluation by domain\u003c/h2\u003e\n \u003cp\u003eFigure 2 shows the performance differences between the ID and the two OOD datasets (HI and UNN), measured in terms of (a) AUROC and (b) sensitivity, respectively, for the variables age, sex, and location. Domain shifts that contain only positive or negative samples are represented as missing values for AUROC, since this metric cannot be computed under such conditions. In these cases, performance is assessed solely using sensitivity, as in the AU group. A general trend can be observed in which AUROC tends to degrade more for the HI dataset than for UNN, with greater decreases in most domain shifts. Nevertheless, these differences are typically bounded within a range of 0.2 to 0.4. Regarding age-related domain shifts, performance degradation in AUROC is more pronounced in HI as age increases: the largest drop is observed for the AO group, followed by AB, and then AU. The same pattern is present in UNN, except for the AU group, where AUROC could not be computed because of the absence of positive cases. Notably, the AU group in HI shows a striking negative sensitivity difference of -0.6, indicating substantially higher sensitivity than in the ID dataset. For the sex variable, performance degradation is consistently greater in the SM group than in the SF group, with comparable trends observed in both OOD datasets. Finally, regarding the location variable, a general performance decrease is observed across domains, particularly pronounced for LL (also in LU and LP, but in this case due to the absence of malignant cases) in UNN. In contrast, the LO domain in HI exhibits a substantial improvement, which is of particular interest due to its low frequency in the ID dataset, both in training and test sets (see Table \u003cspan class=\"InternalRef\"\u003e4\u003c/span\u003e).\u003c/p\u003e\n \u003cp\u003eFor the evaluation of the domain shifts defined by the diagnosis of the lesion (Fig. \u003cspan class=\"InternalRef\"\u003e3\u003c/span\u003e), accuracy is used, since all samples within each diagnostic subtype belong to a single class (non-malignant or malignant), rendering AUROC values undefined. In this context, for non-malignant diagnostic subtypes, the accuracy metric corresponds to specificity, as there are no true positives or false negatives, while for malignant subtypes, it reflects sensitivity, given the absence of true negatives and false positives. Among non-malignant diagnoses, DV shows a notably better performance in OOD datasets compared to ID, with a difference in accuracy ranging between \u0026minus;\u0026thinsp;0.5 and \u0026minus;\u0026thinsp;0.6. DS subtype also exhibits a slight improvement (difference between 0 and \u0026minus;\u0026thinsp;0.2). In contrast, several diagnostic subtypes\u0026mdash;DN, DA, DL, and DLk\u0026mdash;demonstrate a clear performance drop in OOD datasets, with accuracy differences exceeding 0.2. For the non-malignant diagnostic subtype not represented in the ID dataset (DAk), accuracy values in both OOD datasets are above 0.2 but remain below 0.6, indicating a limited generalization. Regarding malignant diagnoses, the DM subtype shows a slight improvement in accuracy in the HI dataset, whereas in the UNN dataset, a decline of approximately 0.2 is observed. The DB subtype exhibits a marked decrease in performance in both OOD datasets, with the degradation more pronounced in HI. Lastly, for the malignant subtype not present in the ID dataset (DSc), accuracy falls below 0.5 in both OOD datasets, suggesting a poor generalization for this class.\u003c/p\u003e\n \u003cp\u003eFigure 4 presents the performance results, in terms of (a) AUROC and (b) sensitivity, for the variables that are only available in the OOD datasets. For the Fitzpatrick skin type, acceptable performance is observed for FI and FII, although FII shows slightly lower sensitivity in the HI dataset. Sensitivity values of 0 are associated with the absence of malignant cases for type FIV in HI and type FIII in the UNN dataset, which limits the interpretability in these subgroups. Regarding the family history of skin cancer, the HN group shows consistent sensitivity across both OOD datasets, with only minor differences in AUROC, all exceeding 0.6. In contrast, the HY group displays clearly better performance in the HI dataset, with acceptable values for both metrics, while in the UNN dataset, neither AUROC nor sensitivity reaches 0.5, suggesting poor generalization in this subgroup.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv id=\"Sec16\" class=\"Section2\"\u003e\n \u003ch2\u003eModel confidence by domain\u003c/h2\u003e\n \u003cp\u003eFinally, the confidence of the model across the different domain shifts is evaluated for all datasets: the ID test set, HI, and UNN. Figure \u003cspan class=\"InternalRef\"\u003e5\u003c/span\u003e presents the results for the variables age, sex, and location. In general, the ID dataset shows narrower confidence intervals that are closer to the optimal values (i.e., 0 for the negative class and 1 for the positive class), followed by UNN and, lastly, HI. When comparing the two OOD datasets, UNN exhibits more compact confidence distributions than HI, whose intervals are considerably wider and thus more difficult to interpret reliably. Notably, several specific domains display strong confidence levels. For the UNN dataset, LL, LU, SF, and LT show particularly low-spread confidence distributions. In the HI dataset, AU and LO stand out for the positive class, exhibiting confidence levels that even surpass those observed in the ID set.\u003c/p\u003e\n \u003cp\u003eRegarding the confidence evaluation based on the diagnosis of the lesion (Fig. \u003cspan class=\"InternalRef\"\u003e6\u003c/span\u003e), the model shows generally low confidence in the ID dataset, except for the subtypes DN, DM, and DB, those with the highest number of samples, where confidence is better. Most non-malignant diagnoses in the ID dataset (DA, DS, DL, DLk, and DV) exhibit confidence intervals centered around or slightly above 0.5, indicating moderate uncertainty in classification. In the HI dataset, confidence intervals are generally wide and poorly calibrated, limiting the reliability of interpretation. Notable exceptions include high confidence for DS and DL subtypes, and low confidence for DB and DSc, suggesting class-dependent variation in generalization performance. Finally, in the UNN dataset, the DV subtype stands out with relatively well-calibrated confidence values, whereas other subtypes, such as DA and DAk, show highly inadequate confidence estimates, further highlighting the limited ability to generalize to these diagnostic categories.\u003c/p\u003e\n \u003cp\u003eFor variables collected exclusively in the OOD datasets (Fitzpatrick skin type and family history of skin cancer), the confidence distributions are shown as boxplots in Fig. \u003cspan class=\"InternalRef\"\u003e7\u003c/span\u003e. Due to the broad ranges and the concentration of predicted probabilities around 0.5, the interpretability of these results is limited. This suggests that the model exhibits high uncertainty in these subgroups, which hinders reliable conclusions about its confidence in classification.\u003c/p\u003e\n\u003c/div\u003e"},{"header":"Discussion","content":"\u003cp\u003eDespite the large number of studies focused on the classification of skin lesions, the majority rely on public datasets and report performance based on ID evaluation within these same datasets. Only a limited number of studies assess model performance on truly independent data, or OOD data, which obscures the real-world generalization of these approaches. To address this gap, the present study focuses on evaluating deep learning models on OOD datasets.\u003c/p\u003e\u003cp\u003eThe divergence analysis reveals that most biologically defined subgroups exhibited high distributional similarity between the ID dataset and both OOD datasets (HI and UNN). However, some subgroups show meaningful shifts that may impact model performance. The best example is AO, showing a clear divergence, particularly in the UNN dataset (JS\u0026thinsp;=\u0026thinsp;0.118, cosine\u0026thinsp;=\u0026thinsp;0.675), indicating a notable over-representation caused by no malignant cases in this domain. Diagnosis-related subgroups, especially DN, also display divergence in both HI and UNN, suggesting substantial changes in the prevalence of the diagnostic subtype of lesions. For the sex variable, divergence is generally limited, although the SM subgroup in UNN shows a slightly higher KL value (0.122), hinting at a mild imbalance in male representation. Location subgroups show moderate shifts, with relatively high cosine similarities (\u0026gt;\u0026thinsp;0.96), indicating non-drastic changes. Interestingly, certain diagnostic subtypes (e.g., DA) show high KL divergence but low JS and high cosine similarity, pointing to sharp frequency spikes rather than broad distributional shifts, highlighting the importance of interpreting these metrics in combination. These findings support the presence of relevant domain shifts in specific subgroups, particularly in age and diagnosis, which can contribute to the performance degradation observed in OOD evaluations. A comprehensive understanding of these shifts is essential for developing more robust and generalizable models as it reveals the degree of divergence between ID and OOD data distributions. Identifying such discrepancies allows researchers to anticipate scenarios where models are likely to underperform and to design strategies\u0026mdash;such as domain adaptation, data augmentation reflecting real-world exposures, or the inclusion of more diverse training cohorts\u0026mdash;that can mitigate these gaps. In future work, expanding datasets with multi-institutional and demographically heterogeneous samples could be a key step towards reducing distributional biases and improving clinical applicability.\u003c/p\u003e\u003cp\u003eThe selected VGG model (BS\u0026thinsp;=\u0026thinsp;8, LR\u0026thinsp;=\u0026thinsp;10\u003csup\u003e\u0026minus;\u0026thinsp;5\u003c/sup\u003e) achieves the best overall results in the ID test set and maintains acceptable performance across all OOD metrics. However, other architectures, such as DenseNet, outperform it in specific metrics within the OOD datasets. A closer inspection reveals that domain shifts substantially impact classification performance in specific subgroups. In particular, performance degradation is more pronounced in the HI dataset than in UNN, consistent with the stronger distributional shifts observed in earlier analyses. Age-related shifts, especially in AO, are associated with substantial drops in AUROC and sensitivity, suggesting that age imbalance between training and OOD datasets may significantly affect model generalization, as seen in the divergence analysis. Similar trends are observed in other variables such as sex and location of the lesion, with male patients (SM) and certain anatomical regions (e.g., LL, LU) showing reduced performance, coinciding with previous tests. The analysis by diagnostic subtype further highlights the sensitivity of the model to shifts in class composition. Although some non-malignant lesions, such as DV and DS, maintain or even improve performance in OOD datasets, others, particularly those underrepresented during training (e.g., DA, DLk), show marked declines. This effect is even more evident for malignant subtypes such as DB and DSc, where generalization failed altogether in some cases. Lastly, results for variables only available in OOD datasets (e.g., Fitzpatrick skin type and family history) reveal limited interpretability in subgroups with few positive cases, and notable performance asymmetries between datasets, especially in HY, where the model performs poorly in UNN. These findings reinforce the importance of subgroup-level evaluation when assessing model robustness beyond global metrics.\u003c/p\u003e\u003cp\u003eThe results of model confidence are shown in Fig.\u0026nbsp;\u003cspan refid=\"Fig3\" class=\"InternalRef\"\u003e5\u003c/span\u003e, Fig.\u0026nbsp;\u003cspan refid=\"Fig4\" class=\"InternalRef\"\u003e6\u003c/span\u003e, and Fig.\u0026nbsp;\u003cspan refid=\"Fig5\" class=\"InternalRef\"\u003e7\u003c/span\u003e. Overall, the ID dataset exhibits the most compact and well-calibrated confidence distributions. Between the two OOD datasets, UNN generally maintained tighter confidence ranges, indicating a comparatively better calibration. In this case, it should be noted that the HI dataset has a much higher number of samples than UNN (1270 vs. 217), which may cause greater variability. At the domain level, several subgroups demonstrated strong confidence patterns. In UNN, SF, LL, and LU show well-calibrated confidence distributions. In HI, AU, and LO stood out, with confidence for the positive class even exceeding that of ID in some cases. When analyzed by diagnosis of the lesion (Fig.\u0026nbsp;\u003cspan refid=\"Fig4\" class=\"InternalRef\"\u003e6\u003c/span\u003e), the model shows low confidence in most ID subtypes, except for DN, DM, and DB - the most represented classes - where the confidence is markedly higher. In the HI dataset, confidence intervals are generally wide and poorly calibrated, limiting interpretability. Exceptions include higher confidence for DS and DL and markedly low confidence for DB and DSc, reflecting poor generalization for those subtypes. In contrast, the UNN dataset shows more reliable confidence for DV, while DA and DAk exhibit very low and uninformative values. Finally, for the OOD-only variables (Fitzpatrick skin type and family history), confidence distributions (Fig.\u0026nbsp;\u003cspan refid=\"Fig5\" class=\"InternalRef\"\u003e7\u003c/span\u003e) are broad and centered around 0.5, limiting interpretability and suggesting high uncertainty in these underrepresented subgroups.\u003c/p\u003e\u003cp\u003eCompared to existing studies, the works by Fogelberg \u003cem\u003eet al.\u003c/em\u003e [17] and Chamarthi \u003cem\u003eet al.\u003c/em\u003e [18] are based on the ISIC dataset and do not incorporate truly independent OOD datasets. Among them, Fogelberg \u003cem\u003eet al.\u003c/em\u003e conducted the most similar analysis, but it focuses solely on distinguishing between NEV and MEL and mainly explores technical shifts, including only two clinical variables: age and location, limiting the study based on biological shifts.\u003c/p\u003e\u003cp\u003eDespite the novelty of the present study, it is not exempt from some limitations. First, among the datasets used to define the ID set, only ISIC includes all clinical variables that allow direct matching with the OOD datasets. Derm7pt lacks patient age, and PH2 lacks age, sex, and location, which limits consistent domain shift analysis. Additionally, certain domain shifts\u0026mdash;such as specific diagnostic subtypes (e.g., DAk and DSc)\u0026mdash;are not represented in the ID dataset, preventing a direct comparison with OOD samples. Furthermore, variables such as Fitzpatrick skin type and family history of skin cancer are only available in the OOD datasets, which restricts their interpretability in the absence of corresponding ID distributions. Regarding the OOD datasets themselves, limitations include the small number of samples\u0026mdash;especially in the UNN dataset\u0026mdash;and class imbalance between malignant and non-malignant lesions. Moreover, clinical variables across datasets are not always annotated using consistent criteria, requiring aggregation into broader, less specific categories to enable alignment. From a methodological standpoint, the study relies on four CNN architectures, while well-established and effective for similar tasks, they are relatively outdated compared to more recent advances in deep learning. Additionally, the optimization of hyperparameters, such as BS and LR, is performed using a grid search, which may be less efficient or flexible than more adaptive strategies (e.g., Bayesian optimization or population-based training).\u003c/p\u003e\u003cp\u003eBased on these findings, future work should focus on developing models that are more generalizable to the underrepresented or challenging domains identified in this study. Further investigation of technical domain shifts (e.g., image acquisition differences) is also warranted to better understand their influence on model robustness. Expanding the range of model architectures and incorporating larger and more diverse datasets with harmonized clinical annotations will also be essential to advance toward real-world deployment.\u003c/p\u003e"},{"header":"Conclusions","content":"\u003cp\u003eThis study provides an evaluation of deep learning models for skin lesion classification under OOD conditions, incorporating clinically meaningful domain shifts such as age, sex, lesion location, and diagnosis. By analyzing performance across two independent datasets, it is revealed that models trained on public data often fail to generalize to real-world clinical scenarios. Subgroup-specific evaluation proved essential to uncover performance disparities that are not captured by global metrics. Notable examples include younger patients (AO), male individuals (SM), or certain body locations such as the lower (LL) or upper limbs (LU). Moreover, the absence of certain diagnoses in ID datasets (DAk or DSc) reveals the limitations of models trained with these public datasets. Finally, the lack of relevant metadata, such as Fitzpatrick's skin type, is emphasised, as it may be crucial for assessing model generalization across diverse populations. These results underscore the need for domain-aware evaluation strategies and the development of models explicitly designed to handle biological and technical variability. Achieving robust performance in real-world settings will require more diverse datasets, standardized metadata annotations, and the adoption of adaptive training methods capable of improving generalization under distributional shift.\u003c/p\u003e"},{"header":"Abbreviations","content":"\u003cp\u003eAI: Artificial Intelligence\u003c/p\u003e\n\u003cp\u003eAK: Actinic keratosis\u003c/p\u003e\n\u003cp\u003eAOT-GAN: Aggregated Contextual-Transformation-Generative Adversarial Network\u003c/p\u003e\n\u003cp\u003eAtt-Net: Attention U-Net\u003c/p\u003e\n\u003cp\u003eATY: Atypical nevus\u003c/p\u003e\n\u003cp\u003eAUROC: Area under the receiver operating characteristic curve\u003c/p\u003e\n\u003cp\u003eBCC: Basal cell carcinoma\u003c/p\u003e\n\u003cp\u003eBS: Batch size\u003c/p\u003e\n\u003cp\u003eCNNs: Convolutional Neural Networks\u003c/p\u003e\n\u003cp\u003eDFB: Dermatofibroma\u003c/p\u003e\n\u003cp\u003eH/N: Head/Neck\u003c/p\u003e\n\u003cp\u003eHI: Hospital Italiano\u003c/p\u003e\n\u003cp\u003eID: In-distribution\u003c/p\u003e\n\u003cp\u003eIID: Independent and identically distributed\u003c/p\u003e\n\u003cp\u003eISIC: International Skin Imaging Collaboration\u003c/p\u003e\n\u003cp\u003eJS: Jensen\u0026ndash;Shannon\u003c/p\u003e\n\u003cp\u003eKL: Kullback\u0026ndash;Leibler\u003c/p\u003e\n\u003cp\u003eL_ext: Lower extremity\u003c/p\u003e\n\u003cp\u003eLK: Lichenoid keratosis\u003c/p\u003e\n\u003cp\u003eLR: Learning rate\u003c/p\u003e\n\u003cp\u003eMEL: Melanoma\u003c/p\u003e\n\u003cp\u003eNEV: Nevus\u003c/p\u003e\n\u003cp\u003eO/G: Oral/Genital\u003c/p\u003e\n\u003cp\u003eOOD: Out-of-distribution\u003c/p\u003e\n\u003cp\u003eP/S: Palms/Soles\u003c/p\u003e\n\u003cp\u003eSCC: Squamous cell carcinoma\u003c/p\u003e\n\u003cp\u003eSK: Seborrheic keratosis\u003c/p\u003e\n\u003cp\u003eT: Torso\u003c/p\u003e\n\u003cp\u003eU_ext: Upper extremity\u003c/p\u003e\n\u003cp\u003eULPGC: Universidad Las Palmas de Gran Canaria\u0026nbsp;\u003c/p\u003e\n\u003cp\u003eUNN: University Hospital of North Norway\u003c/p\u003e\n\u003cp\u003eVASC: Vascular lesion\u003c/p\u003e\n\u003cp\u003eWARIFA: Watching the risk factors: Artificial intelligence and the prevention of chronic conditions\u003c/p\u003e"},{"header":"Declarations","content":"\u003ch3\u003eAcknowledgements\u003c/h3\u003e\n\u003cp\u003eThis work was supported by the European Commission through the H2020-EU.3.1.4.2, European Project WARIFA (Watching the risk factors: Artificial intelligence and the prevention of chronic conditions) under Grant Agreement; and by the Spanish federal grants PID2019-107768RA-I00 \\\u0026amp; PID2023-149457OB-I00 (all funded by the agency AEI/10.13039/501100011033). The study sponsors have not been involved in any stage of the study.\u003c/p\u003e\n\u003ch3\u003eConflicts of Interest\u003c/h3\u003e\n\u003cp\u003eThe authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.\u003c/p\u003e"},{"header":"References","content":"\u003col\u003e\n\u003cli\u003eInternational Agency for Research on Cancer, Skin cancer \u0026ndash; IARC, (2025). https://www.iarc.who.int/ (accessed September 4, 2025).\u003c/li\u003e\n\u003cli\u003eJ. Ferlay, M. Ervik, F. Lam, M. Laversanne, M. Colombet, L. Mery, M. Pi\u0026ntilde;eros, A. Znaor, I. Soerjomataram, F. Bray, Global Cancer Observatory: Cancer Today, (2024).\u003c/li\u003e\n\u003cli\u003eH. Sung, J. Ferlay, R.L. Siegel, M. Laversanne, I. Soerjomataram, A. Jemal, F. Bray, Global cancer statistics 2020: GLOBOCAN estimates of incidence and mortality worldwide for 36 cancers in 185 countries, CA Cancer J Clin (2021). https://doi.org/10.3322/caac.21660.\u003c/li\u003e\n\u003cli\u003eH.D. Heibel, L. Hooey, C.J. Cockerell, A Review of Noninvasive Techniques for Skin Cancer Detection in Dermatology, Am J Clin Dermatol 21 (2020) 513\u0026ndash;524. https://doi.org/10.1007/S40257-020-00517-Z.\u003c/li\u003e\n\u003cli\u003eM. Hasan, N. Naik, R. Gupta, N. Krishnan, N.M. Nasrabadi, A survey, review, and future trends of skin lesion segmentation and classification, ArXiv Preprint ArXiv:2208.12232 (2022). https://arxiv.org/abs/2208.12232.\u003c/li\u003e\n\u003cli\u003eM. Goyal, A. Oakley, P. Bansal, D. Dancey, M.H. Yap, Artificial Intelligence\u0026ndash;Based Image Classification for Diagnosis of Skin Cancer: Challenges and Opportunities, ArXiv Preprint ArXiv:1911.11872 (2019). https://arxiv.org/abs/1911.11872.\u003c/li\u003e\n\u003cli\u003eY. Wu, B. Chen, A. Zeng, D. Pan, R. Wang, S. Zhao, Skin Cancer Classification With Deep Learning: A Systematic Review, Front Oncol 12 (2022) 893972. https://doi.org/10.3389/fonc.2022.893972.\u003c/li\u003e\n\u003cli\u003eD. Popescu, M. El-Khatib, H. El-Khatib, L. Ichim, New Trends in Melanoma Detection Using Neural Networks: A Systematic Review, Sensors 22 (2022) 496. https://doi.org/10.3390/s22020496.\u003c/li\u003e\n\u003cli\u003eA. Naeem, M.S. Farooq, A. Khelifi, A. Abid, Malignant Melanoma Classification Using Deep Learning: Datasets, Performance Measurements, Challenges and Opportunities, IEEE Access 8 (2020) 110575\u0026ndash;110597. https://doi.org/10.1109/ACCESS.2020.3001507.\u003c/li\u003e\n\u003cli\u003eJ. Saeed, S. Zeebaree, Skin Lesion Classification Based on Deep Convolutional Neural Networks Architectures, Journal of Applied Science and Technology Trends 2 (2021) 41\u0026ndash;51. https://doi.org/10.38094/jastt20189.\u003c/li\u003e\n\u003cli\u003eV. G\u0026oacute;mez-Mart\u0026iacute;nez, D. Chushig-Muzo, M.B. Veier\u0026oslash;d, C. Granja, C. Soguero-Ruiz, Ensemble feature selection and tabular data augmentation with generative adversarial networks to enhance cutaneous melanoma identification and interpretability, BioData Min 17 (2024) 46. https://doi.org/10.1186/s13040-024-00397-7.\u003c/li\u003e\n\u003cli\u003eU.-O. Dorj, K.-K. Lee, J.-Y. Choi, M. Lee, The skin cancer classification using deep convolutional neural network, Multimed Tools Appl 77 (2018) 9909\u0026ndash;9924. https://doi.org/10.1007/s11042-018-5714-1.\u003c/li\u003e\n\u003cli\u003eS. Mishra, H. Imaizumi, T. Yamasaki, Interpreting Fine-Grained Dermatological Classification by Deep Learning, in: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), IEEE, 2019: p. 0. https://doi.org/10.1109/CVPRW.2019.00331.\u003c/li\u003e\n\u003cli\u003eA. Masood, A. Al-Jumaily, K. Anam, Self-Supervised Learning Model for Skin Cancer Diagnosis, in: 2015 7th International IEEE/EMBS Conference on Neural Engineering (NER), IEEE, Manhattan, New York, USA, 2015: pp. 1012\u0026ndash;1015. https://doi.org/10.1109/NER.2015.7146798.\u003c/li\u003e\n\u003cli\u003eH. Yu, J. Liu, X. Zhang, J. Wu, P. Cui, A Survey on Evaluation of Out-of-Distribution Generalization, ArXiv Preprint ArXiv:2308.13601 (2023).\u003c/li\u003e\n\u003cli\u003eY. Yang, H. Zhang, J.W. Gichoya, D. Katabi, M. Ghassemi, The limits of fair medical imaging AI in real-world generalization, Nat Med (2024). https://doi.org/10.1038/s41591-024-03113-4.\u003c/li\u003e\n\u003cli\u003eK. Fogelberg, S. Chamarthi, R.C. Maron, J. Niebling, T.J. Brinker, Domain shifts in dermoscopic skin cancer datasets: Evaluation of essential limitations for clinical translation, N Biotechnol 76 (2023) 106\u0026ndash;117. https://doi.org/10.1016/j.nbt.2023.04.006.\u003c/li\u003e\n\u003cli\u003eS. Chamarthi, K. Fogelberg, T.J. Brinker, J. Niebling, Mitigating the influence of domain shift in skin lesion classification: A benchmark study of unsupervised domain adaptation methods, Inform Med Unlocked 44 (2024) 101430. https://doi.org/10.1016/j.imu.2023.101430.\u003c/li\u003e\n\u003cli\u003eV. Rotemberg, N. Kurtansky, B. Betz-Stablein, L. Caffery, E. Chousakos, N. Codella, M. Combalia, S. Dusza, P. Guitera, D. Gutman, A. Halpern, B. Helba, H. Kittler, K. Kose, S. Langer, K. Lioprys, J. Malvehy, S. Musthaq, J. Nanda, O. Reiter, G. Shih, A. Stratigos, P. Tschandl, J. Weber, H.P. Soyer, A patient-centric dataset of images and metadata for identifying melanomas using clinical context, Sci Data 8 (2021) 34. https://doi.org/10.1038/s41597-021-00815-z.\u003c/li\u003e\n\u003cli\u003eJ. Kawahara, S. Daneshvar, G. Argenziano, G. Hamarneh, Seven-Point Checklist and Skin Lesion Classification Using Multitask Multimodal Neural Nets, IEEE J Biomed Health Inform 23 (2019) 538\u0026ndash;546. https://doi.org/10.1109/JBHI.2018.2824327.\u003c/li\u003e\n\u003cli\u003eteresa Mendo\u0026ccedil;a, P.M. Ferreira, A.R.S. Mar\u0026ccedil;al, C. Barata, J.S. Marques, J. Rocha, J. Rozeira, Accurate and Scalable System for Automatic Detection of Malignant Melanoma, in: Dermoscopy Image Analysis, CRC Press, 2015: pp. 309\u0026ndash;360. https://doi.org/10.1201/b19107-14.\u003c/li\u003e\n\u003cli\u003eL. Ricci, N. Fink, L. Alonso, E.A. Luzzardi, G. Lijteroff, M.A. Gonz\u0026aacute;lez, R. Cataldi, J. Gonz\u0026aacute;lez, I.H. Medrano, A patient-centric dermoscopic and clinical skin image dataset collected in Argentina, Sci Data 10 (2023) 528. https://doi.org/10.1038/s41597-023-02630-0.\u003c/li\u003e\n\u003cli\u003eM. Castro-Fernandez, T. Schopf, I. Casta\u0026ntilde;o-Gonzalez, B. Roque, H. Kirchesch, S. Ortega Sarmiento, H. Fabelo, F. Godtliebsen, C. Granja, G. Callico, MCR-SL: A Multimodal, Context-Rich Skin Lesion Dataset for Skin Cancer Diagnosis , (2025). https://doi.org/10.5281/zenodo.17056062.\u003c/li\u003e\n\u003cli\u003eV. G\u0026oacute;mez-Mart\u0026iacute;nez, others, A Data-Driven Approach for Digital Hair Removal in Dermoscopy Images Using Encoder-Decoder and Generative Adversarial Network-Based Models, 2024.\u003c/li\u003e\n\u003cli\u003eD. Jha, M.A. Riegler, D. Johansen, P. Halvorsen, H.D. Johansen, DoubleU-Net: A deep convolutional neural network for medical image segmentation, in: Proceedings of the IEEE Symposium on Computer-Based Medical Systems (CBMS), Institute of Electrical and Electronics Engineers Inc., 2020: pp. 558\u0026ndash;564.\u003c/li\u003e\n\u003cli\u003eS. Kullback, R.A. Leibler, On information and sufficiency, The Annals of Mathematical Statistics 22 (1951) 79\u0026ndash;86. https://doi.org/10.1214/aoms/1177729694.\u003c/li\u003e\n\u003cli\u003eJ. Lin, Divergence measures based on the Shannon entropy, IEEE Trans Inf Theory 37 (1991) 145\u0026ndash;151. https://doi.org/10.1109/18.61115.\u003c/li\u003e\n\u003cli\u003eD.M. Endres, J.E. Schindelin, A new metric for probability distributions, IEEE Trans Inf Theory 49 (2003) 1858\u0026ndash;1860. https://doi.org/10.1109/TIT.2003.813506.\u003c/li\u003e\n\u003cli\u003eG. Salton, M.J. McGill, Introduction to Modern Information Retrieval, McGraw-Hill, Inc., 1983.\u003c/li\u003e\n\u003cli\u003eA. Krizhevsky, I. Sutskever, G.E. Hinton, ImageNet classification with deep convolutional neural networks, in: Advances in Neural Information Processing Systems (NeurIPS), 2012: pp. 1097\u0026ndash;1105.\u003c/li\u003e\n\u003cli\u003eK. Simonyan, A. Zisserman, Very deep convolutional networks for large-scale image recognition, in: International Conference on Learning Representations (ICLR), 2015.\u003c/li\u003e\n\u003cli\u003eK. He, X. Zhang, S. Ren, J. Sun, Deep residual learning for image recognition, in: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016: pp. 770\u0026ndash;778.\u003c/li\u003e\n\u003cli\u003eG. Huang, Z. Liu, L. Van Der Maaten, K.Q. Weinberger, Densely connected convolutional networks, in: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017: pp. 4700\u0026ndash;4708.\u003c/li\u003e\n\u003cli\u003eM. Sokolova, G. Lapalme, Performance measures in classification of human communications, Inf Process Manag 45 (2009) 427\u0026ndash;437.\u003c/li\u003e\n\u003cli\u003eT. Fawcett, An introduction to ROC analysis, Pattern Recognit Lett 27 (2006) 861\u0026ndash;874.\u003c/li\u003e\n\u003c/ol\u003e"}],"fulltextSource":"","fullText":"","funders":[{"identity":"927f3ea4-1bf1-4297-b543-3fedbd587f30","identifier":"10.13039/501100000780","name":"European Commission","awardNumber":"101017385","order_by":0},{"identity":"9e3be6cb-e6fc-46f6-b8da-dd82eeda124f","identifier":"10.13039/501100011033","name":"Agencia Estatal de Investigación","awardNumber":"PID2019-107768RA","order_by":1},{"identity":"26712a4c-4fe5-4b25-9dc5-870b059fcdea","identifier":"10.13039/501100011033","name":"Agencia Estatal de Investigación","awardNumber":"PID2023-149457OB","order_by":2}],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":true,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":true,"highlight":"","institution":"King Juan Carlos University","isAcceptedByJournal":false,"isAuthorSuppliedPdf":false,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":false,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"Out-of-distribution, skin lesions, image classification","lastPublishedDoi":"10.21203/rs.3.rs-7544969/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-7544969/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003e\u003cstrong\u003eBackground: \u003c/strong\u003eThe availability of public skin lesion image datasets has enabled rapid progress in classification tasks. However, models trained on datasets with similar characteristics, in-distribution (ID) data, often struggle to generalize to new and different data, limiting their utility in clinical settings. New methods are thus needed to assess algorithm performance and trustworthiness on out-of-distribution (OOD) data.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eObjective: \u003c/strong\u003eThis study aims to evaluate the generalization capacity and robustness of deep learning models for the binary classification (malignant vs non-malignant) of skin lesions by assessing their performance and predictive confidence in OOD settings.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eMethods: \u003c/strong\u003eTo this end, four convolutional neural networks (CNNs) —AlexNet, VGG, ResNet, and DenseNet— are trained using public datasets, which serve as the ID group. Their performance and reliability are then evaluated under distribution shifts by testing them on private datasets, considered OOD cohorts.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eResults:\u003c/strong\u003e The VGG model achieves the best overall performance on the ID test set (AUROC = 0.895), maintaining balanced performance across OOD datasets. However, domain shift analysis reveals marked performance drops in specific domains, particularly those with strong distributional shifts in age and diagnosis.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eConclusions: \u003c/strong\u003eThe results underscore the need for domain-aware evaluation and the development of models trained on more diverse and representative datasets to ensure generalization across clinically relevant populations.\u003c/p\u003e","manuscriptTitle":"Out-of-Distribution Performance Analysis of Skin Lesion Classifiers for dermoscopic images","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2025-09-09 11:32:47","doi":"10.21203/rs.3.rs-7544969/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"4739b988-2737-4a8f-8d6a-bb9940ff794c","owner":[],"postedDate":"September 9th, 2025","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[{"id":54265990,"name":"Artificial Intelligence and Machine Learning"}],"tags":[],"updatedAt":"2025-09-09T11:32:47+00:00","versionOfRecord":[],"versionCreatedAt":"2025-09-09 11:32:47","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-7544969","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-7544969","identity":"rs-7544969","version":["v1"]},"buildId":"8U1c8b4HqxoKbykW_rLl7","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.