# Proposed dense variational autoencoder model integrated with contrastive learning for foot ulcer classification

**Authors:** Gunjan Shandilya, Sheifali Gupta, Deepali Gupta, Sapna Juneja, Krishnaraj Chadaga, Ali Nauman, Abeer A. Al-Masri

PMC · DOI: 10.1038/s41598-025-34225-7 · 2026-01-02

## TL;DR

This paper introduces a new deep learning model for accurately classifying diabetic foot ulcers using advanced techniques like variational autoencoders and contrastive learning.

## Contribution

The novel integration of DenseNet121 with Variational Autoencoder and Contrastive Learning (DenseVAE-CL) improves DFU classification accuracy and interpretability.

## Key findings

- DenseVAE-CL achieved 99.6% accuracy and 99.5% precision on DFU classification.
- The model demonstrated stable performance with 99.4 ± 0.2% mean accuracy via five-fold cross-validation.
- Grad-CAM and VAE residual heatmaps effectively localized ulcer regions for better interpretability.

## Abstract

The most serious complication of diabetes, Diabetic Foot Ulcer (DFU), can result in chronic infection, damage to tissues, and even amputation if not identified in a timely way. It is even more dangerous for disabled people. Accurate and timely diagnosis is therefore essential for improved patient outcomes. However, it is difficult to perform a manual assessment of DFU images due to variations in the textures of ulcers, light effects, and severities. Herein is presented an enhanced deep learning framework DenseNet121 with Variational Autoencoder and Contrastive Learning (DenseVAE-CL) which incorporates DenseNet121 to extract robust features and integrates a Variational Autoencoder together with Contrastive Learning to enhance representation discrimination. The model was trained and tested on 2,673 publicly available images from the Kaggle DFU dataset, which was divided into training, validation, and testing subsets in a ratio of 80:10:10, respectively. DenseVAE-CL emerged as the best performer with an accuracy of 99.6%, precision of 99.5%, recall of 99.4%, specificity of 100%, sensitivity of 98.9%, an F1-score of 99.5%, and 0.99 Area Under the Receiver Operating Characteristic Curve (AUC-ROC). Five-fold cross-validation further demonstrated stable generalization with a mean accuracy of 99.4 ± 0.2%. Moreover, calibration analysis confirmed the model’s reliability since a mean confidence of 0.9031 for abnormal cases and 0.9692 for normal cases results in an expected calibration error of 0.0457. Visualization through Grad-CAM and VAE residual heatmaps revealed sharp localization of ulcer regions, hence improving interpretability.

## Linked entities

- **Diseases:** diabetes (MONDO:0005015)

## Full-text entities

- **Diseases:** foot ulcer (MESH:D016523)

## Figures

24 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12859069/full.md

---
Source: https://tomesphere.com/paper/PMC12859069