Explainable Melanoma Diagnosis with Contrastive Learning and LLM-based Report Generation

1College of Computing and Data Science, Nanyang Technological University
2Lee Kong Chian School of Medicine, Nanyang Technological University
3Centre for Frontier AI Research, A*STAR, Singapore
4National Skin Centre & Centre for Medical Technologies and Innovation, NHG, Singapore
*Corresponding Authors

CEFM combines contrastive learning with large language models to provide accurate melanoma diagnosis with clinically interpretable explanations and automated report generation.

Abstract

Deep learning has demonstrated expert-level performance in melanoma classification, positioning it as a powerful tool in clinical dermatology. However, model opacity and the lack of interpretability remain critical barriers to clinical adoption, as clinicians often struggle to trust the decision-making processes of black-box models. To address this gap, we present a Cross-modal Explainable Framework for Melanoma (CEFM) that leverages contrastive learning as the core mechanism for achieving interpretability. Specifically, CEFM maps clinical criteria for melanoma diagnosis—namely Asymmetry, Border, and Color (ABC)—into the Vision Transformer embedding space using dual projection heads, thereby aligning clinical semantics with visual features. The aligned representations are subsequently translated into structured textual explanations via natural language generation, creating a transparent link between raw image data and clinical interpretation. Experiments on public datasets demonstrate 92.79% accuracy and an AUC of 0.961, along with significant improvements across multiple interpretability metrics. Qualitative analyses further show that the spatial arrangement of the learned embeddings aligns with clinicians' application of the ABC rule, effectively bridging the gap between high-performance classification and clinical trust.

Video Presentation

Method Overview

Poster

BibTeX

@article{zheng2025explainable,
  title={Explainable Melanoma Diagnosis with Contrastive Learning and LLM-based Report Generation},
  author={Zheng, Junwen and Xu, Xinran and Wang, Li Rong and Cai, Chang and Tan, Lucinda Siyun and Wang, Dingyuan and Tey, Hong Liang and Fan, Xiuyi},
  journal={arXiv preprint arXiv:2512.06105},
  year={2025}
}