A deep learning framework pairing self-supervised vision representations with uncertainty estimation can flag ambiguous skin cancer diagnoses while calibrating its confidence levels, researchers reported in Discover Computing. Automated dermatological screening tools frequently demonstrate high nominal accuracy yet risk issuing severe diagnostic errors with misplaced confidence, particularly when confronted with visually confusing lesions or underrepresented disease classes. To tackle these hazards, investigators Gaurav Kumar, Shikha Sharma, and Vijay Prakash Sharma evaluated an architecture built upon the self-supervised foundation model DINOv2, augmented by a multi-head self-attention feature-refinement stage and an inference-time uncertainty quantification protocol. Evaluated on an independent, lesion-disjoint test partition of the HAM10000 benchmark containing 992 dermoscopic images across seven diagnostic categories, the proposed system achieved an overall accuracy of 82.96 percent, a weighted F1-score of 0.8342, and a macro-averaged area under the receiver operating characteristic curve of 0.9601. Rather than claiming raw accuracy dominance over existing models, the team demonstrated that integrating predictive variance with post-hoc calibration allows an artificial intelligence system to systematically distinguish reliable predictions from borderline cases requiring expert clinical oversight.
Dermatologists rely heavily on dermoscopic magnification to detect early malignancies such as melanoma, yet distinguishing malignant lesions from benign mimickers remains clinically challenging because disparate diagnostic categories frequently exhibit overlapping pigment networks, irregular borders, and substantial intra-class morphological heterogeneity. While conventional convolutional neural networks like ResNet and EfficientNet provide proficient local feature extraction, they face inherent limitations in modeling long-range contextual relationships across complex tissue boundaries. Conversely, standard vision transformers model comprehensive spatial interactions across image patches through self-attention mechanisms, but their supervised training from scratch typically demands vast quantities of meticulously annotated medical images that remain scarce and expensive to acquire. Foundation vision models pretrained on extensive image collections via self-supervised learning offer an appealing pathway to overcome these data bottlenecks by providing transferable representations. However, raw discriminative capacity does not ensure that a network’s self-reported certainty mirrors genuine diagnostic reliability, creating a critical safety dilemma for computer-aided triage systems.
To establish a rigorous experimental foundation free from subtle information leakage, the authors implemented a strict lesion-disjoint data partitioning strategy across the entire HAM10000 dataset, which comprises 10,015 dermoscopic photographs spanning seven diagnostic classes. These seven categories include actinic keratoses and intraepithelial carcinoma (AKIEC), basal cell carcinoma (BCC), benign keratosis-like lesions (BKL), dermatofibroma (DF), melanoma (MEL), melanocytic nevi (NV), and vascular lesions (VASC). Using a ten-fold StratifiedGroupKFold procedure with patient lesion identifiers designated as the grouping variable and a fixed random seed of 42, the investigators ensured that multiple photographs originating from the same physical lesion could never appear simultaneously across different splits. The resulting division allocated 7,995 images representing approximately 79.8 percent of the data to training, 1,028 images or roughly 10.3 percent to validation, and 992 images comprising 9.9 percent to an untouched holdout test set, with explicit identifier checks verifying absolute partition independence.
The engineering pipeline begins by resizing all input dermoscopy images to 224 by 224 pixels and applying stochastic data augmentations, including flipping, rotation, cropping, and color jitter, exclusively during the training phase to improve generalization against clinical variations. The standardized images enter the DINOv2 ViT-B/14 backbone, which segments each image into spatial patches and outputs a sequence of 768-dimensional latent embeddings comprising one class token alongside visual patch tokens. To preserve the rich visual priors acquired during broad pretraining while adapting the representations to medical pathology, the backbone parameters were initially frozen, permitting only the final two transformer encoder blocks to undergo fine-tuning during downstream supervised training. The entire token sequence is subsequently routed into an intermediate Multi-Head Self-Attention module featuring eight attention heads and an embedding dimension of 768. Following contextual reweighting and a residual connection paired with layer normalization, the refined class token is forwarded into a lightweight multilayer perceptron classifier that compresses the dimensionality from 768 down to 256 before final projection onto the seven diagnostic output nodes.
Addressing the severe category imbalance characteristic of real-world dermatological registries represented another core methodological hurdle within the supervised training scheme. The distribution in the HAM10000 collection is heavily skewed toward common benign conditions such as melanocytic nevi, which easily overwhelms rarer conditions during gradient updates. To counter this skew, the team computed class-specific weights derived from training frequencies and incorporated them directly into a weighted cross-entropy loss function, deliberately penalizing misclassifications on minority categories more heavily. Optimization was conducted using the AdamW algorithm with a learning rate of 1 multiplied by 10 to the negative fifth power, a weight decay of 1 multiplied by 10 to the negative fourth power, and a batch size of 16 across up to 20 training epochs. Learning rate adjustments were governed by a plateau reduction scheduler monitoring validation loss, ensuring that hyperparameter configurations and model selection remained entirely isolated from the final untouched test partition.
Rather than treating uncertainty quantification as an architectural heuristic trained end-to-end, the framework implements Monte Carlo Dropout strictly as an inference-time diagnostic procedure without modifying frozen network parameters. By maintaining active dropout layers with a rate of 0.3 across 20 stochastic forward passes for every incoming test sample, the system generates an ensemble of predictive distributions. The arithmetic mean across these passes yields the definitive class probability assignment, while the dispersion among the passes serves as an empirical readout of predictive variance. Simultaneously, the framework mitigates probability distortion by applying post-hoc temperature scaling to the model logits. A learned temperature scalar of 1.5794, optimized on the validation split, acts to soften overconfident logit distributions. When evaluated against ground-truth labels on the test set, temperature scaling lowered the Expected Calibration Error from 0.0911 down to 0.0369, while the overall Brier Score decreased from 0.2651 to 0.2467 and negative log-likelihood dropped from 0.5632 to 0.4907, confirming marked gains in probabilistic alignment.
In empirical evaluations on the 992-image test partition, the representative DINOv2 with multi-head self-attention system delivered an overall diagnostic accuracy of 82.96 percent, accompanied by a macro-averaged F1-score of 0.7502 and a weighted F1-score of 0.8342. Multi-class receiver operating characteristic analysis yielded an exceptional micro-average area under the curve of 0.9797, a macro-average area under the curve of 0.9601, and a weighted area under the curve of 0.9551. To quantify vulnerability to stochastic training variability, the researchers executed five independent training runs under varying random seeds. This reproducibility assessment yielded a mean accuracy of 80.85 percent with a standard deviation of 1.41 percent, an average weighted F1-score of 0.8171 plus or minus 0.0132, a macro F1-score of 0.7141 plus or minus 0.0220, and a macro area under the curve of 0.9561 plus or minus 0.0070, affirming the steady discriminative behavior of the underlying visual representations.
A granular class-wise performance breakdown exposed considerable diagnostic disparities across different lesion types, reflecting persistent morphological dilemmas in clinical dermatology. Actinic keratoses and intraepithelial carcinoma exhibited the lowest individual sensitivity at 0.4474, indicating that more than half of these minority cases escaped categorical identification under standard decision thresholds. In contrast, well-circumscribed entities achieved outstanding separation, evidenced by dermatofibroma attaining an area under the curve of 0.9992, basal cell carcinoma reaching 0.9882, and benign keratosis-like lesions logging 0.9640.
The efficacy of the uncertainty quantification mechanism was highlighted when comparing the predictive variance observed across correct versus failed classifications. Correctly classified test samples yielded an average predictive uncertainty score of 0.0626, whereas incorrect classifications exhibited a substantially elevated mean uncertainty of 0.2260, representing an approximate 3.6-fold increase in diagnostic ambivalence. Utilizing this predictive uncertainty score directly as a continuous metric for autonomous error detection produced an area under the receiver operating characteristic curve of 0.8293. Furthermore, selective prediction experiments examining the area under the risk-coverage curve achieved a score of 0.0502, illustrating that filtering out predictions characterized by elevated uncertainty systematically eliminates diagnostic blunders. In clinical deployment scenarios, such selective prediction protocols would allow an algorithm to process unambiguous presentations autonomously while redirecting borderline presentations directly to specialist review panels.
To understand the exact structural impact of the intermediate attention module, the authors conducted an ablation study comparing the complete architecture against a baseline employing the DINOv2 backbone directly connected to the multilayer perceptron classifier. The standalone DINOv2 baseline achieved a comparable top-1 accuracy of 82.86 percent, a weighted F1-score of 0.8335, and a macro F1-score of 0.7529. Incorporating the attention module shifted accuracy marginally to 82.96 percent and macro F1 to 0.7502, with McNemar testing yielding a p-value of 0.5692, confirming no statistically significant change in categorical decisions. However, quantitative geometric analysis of the 768-dimensional latent space revealed noticeable organizational improvements: the Silhouette Score rose from 0.1447 to 0.1854, the Davies–Bouldin Index declined from 2.2678 to 2.0147, and the inter-to-intra-class separation ratio increased from 1.3373 to 1.4883, indicating that attention mechanisms primarily enhance latent cluster coherence rather than brute classification margins.
Comparative benchmarking against established computer vision baselines provided essential context for assessing raw predictive capacity versus trustworthiness. When trained on the identical data partitions under standardized class-weighted loss functions, ImageNet-pretrained vision transformers including ViT-B/16 and Swin-Tiny achieved top-1 accuracies of 86.29 percent, surpassing the 82.96 percent recorded by the DINOv2 framework, while lightweight EfficientNet-B0 trailed at 77.12 percent. Parameter counts highlighted distinct trade-offs: EfficientNet-B0 encompassed 4.02 million parameters, Swin-Tiny contained 27.52 million, ViT-B/16 totaled 85.81 million, and the proposed framework comprised 89.14 million total parameters, though only 16.74 million were trainable due to backbone freezing. The authors noted that these performance discrepancies demonstrate why their architecture is not offered as a universally superior classifier, but rather as an integrated methodology emphasizing reliability, calibrated probability, and data-efficient deployment.
The framework demonstrated notable stability during limited-data stress tests where training subsets were restricted to 10 percent, 25 percent, 50 percent, and 100 percent of available images. Under the severely constrained 10 percent condition, the architecture retained a macro area under the curve of 0.9255 and a macro F1-score of 0.6443, reaching an accuracy of 78.73 percent. Performance progressed as data availability grew, reaching a macro area under the curve of 0.9601 and macro F1 of 0.7502 at full capacity, though accuracy fluctuated non-monotonically at 76.51 percent for 25 percent data and 77.52 percent for 50 percent data. Non-parametric bootstrap resampling over 2,000 iterations generated 95 percent confidence intervals that verified narrow bounds for overall accuracy and discrimination metrics, alongside a broader interval for macro F1 that mirrored the persistent challenge of learning minority categories from limited sample volumes.
Despite its structured strengths, the authors outlined substantial limitations that preclude immediate clinical translation. The experimental findings are derived solely from retrospective analysis of the HAM10000 repository, meaning the results do not guarantee generalization across diverse imaging equipment, independent clinical centers, or variable patient demographics. Furthermore, the model operates purely on isolated dermoscopic image arrays without contextual access to patient medical histories, anatomical lesion locations, or multi-modal clinical markers. Crucially, qualitative attention visualizations revealed occasional instances of incorrect classifications accompanied by low uncertainty scores, indicating that while Monte Carlo Dropout identifies many ambiguous cases, it cannot eliminate high-confidence mistakes entirely. Future investigations must evaluate multi-center cohorts, incorporate multimodal clinical data, and examine advanced risk-control techniques such as conformal prediction before autonomous diagnostic aids can be responsibly adopted in practice.
Subject of Research: Trustworthy skin lesion classification using pretrained DINOv2 representations and uncertainty quantification
Article Title: Trustworthy DINOv2-based skin lesion classification with uncertainty quantification and robust learning from limited medical images
Article References: Kumar, G., Sharma, S., & Sharma, V. P. (2026). Trustworthy DINOv2-based skin lesion classification with uncertainty quantification and robust learning from limited medical images. Discover Computing, 29(1), Article 881. https://doi.org/10.1007/s10791-026-10748-z
Image Credits: AI Generated
DOI: 10.1007/s10791-026-10748-z
Keywords: DINOv2, skin lesion classification, HAM10000 dataset, Monte Carlo Dropout, uncertainty quantification, temperature scaling, probability calibration, dermoscopy, melanoma detection, multi-head self-attention, selective prediction, foundation models, computer-aided diagnosis, medical image analysis, feature representation, risk-coverage analysis, data-efficient learning
News Source: Ophelia Keating. (November 12, 2026). Reliable Vision Model Gauges Diagnostic Uncertainty in Skin Lesion Analysis. Scienmag.



