WorksComputer Science
DermKG: A Concept-Centric Knowledge Graph for Interpretable Skin Disease Diagnosis from Dermatological Morphology
Abstract
Dermatologists describe lesions with a standardized morphological lexicon, which makes concept-based models attractive for interpretable skin disease diagnosis. How much diagnostic information these concepts actually carry, however, is rarely quantified. We present DermKG, a concept-centric knowledge graph built on the expert-annotated SkinCon subset of Fitzpatrick17k (3,230 images, 48 concepts, 113 diseases). DermKG has 3,452 nodes of 8 types and 19,365 edges of 11 relation types, and encodes disease concept profiles, concept co-occurrence, a three-level diagnostic hierarchy, and 20 clinical morphology rules, all of which are supported by the training data (15 strong, 5 moderate). An information-ceiling analysis shows that the 3,230 lesions collapse onto only 813 distinct concept vectors, bounding concept-only top-1 accuracy at 38.9% for diseases and 77.6% for the nine categories. Within this bound, DermKG-Net, a graph neural network that scores lesions against disease prototypes and aggregates them along the hierarchy, raises category-level balanced accuracy from 0.257 to 0.411 over the strongest of 11 baselines (paired bootstrap difference , 95% CI ) and more than doubles minority-category recall. Ablations show that most of this gain comes from the hierarchical prototype objective, with a smaller contribution from graph structure. DermKG further yields rule-based reasoning chains and concept-level explanations for individual predictions.
Introduction
Deep networks reach dermatologist-level accuracy on selected skin lesion tasks [1], enable accurate lesion segmentation and detection [2, 3, 4], and have recently scaled to multimodal foundation models and large language models for dermatology [5], [6]. However, their decisions are difficult to audit, and they degrade on under-represented diseases and skin tones [7]. Clinicians, in contrast, reason through an explicit vocabulary: a lesion is described by its primary morphology (papule, plaque, vesicle), secondary changes (scale, crust, ulcer), color and distribution, and these descriptors are mapped to a differential diagnosis [8]. Concept-based models such as concept bottleneck models [9], [10], inherently interpretable concept encoders for skin lesions [11] and concept-grounded foundation models [12] adopt this structure to make predictions interpretable, and the SkinCon dataset [13] provides dense dermatologist-annotated concepts for this purpose.
Two questions remain open. First, how much diagnostic information do the concepts themselves carry? If many diseases share the same description, no concept-based model can separate them, regardless of how concepts are predicted from pixels. Second, how should the relational knowledge that links concepts to diagnoses, such as disease profiles, concept co-occurrence, the diagnostic hierarchy and clinical rules, be represented and used? Knowledge graphs (KGs) are a natural representation for such knowledge in medicine [14], [15], and recent dermatology vision-language models inject ontology knowledge into pretraining [16], [17], but explicit graph representations of concept-to-diagnosis knowledge have received little attention.
This paper studies concept-only diagnosis, isolating the concept-to-diagnosis step from image analysis. Our contributions are:
We construct DermKG, a concept-centric knowledge graph linking 48 concepts, 113 diseases and a three-level hierarchy through disease profiles, concept co-occurrence and 20 data-validated clinical rules, built without test-label leakage.
We introduce an information-ceiling analysis showing that concept-only diagnosis is fundamentally bounded at the disease level but far less constrained at the category level.
We propose DermKG-Net, a hierarchical graph model that scores lesions against disease prototypes, and evaluate it against 11 baselines with bootstrap confidence intervals and ablations.
We provide case-level interpretability through rule-based reasoning chains and concept-level attributions.
Methods
DermKG Construction
DermKG (Figure 1) contains eight node types: skin images, concepts, concept groups, diseases, categories, super-categories, Fitzpatrick skin types and clinical rules. The 48 concepts are organized into five groups that follow the clinical description order: primary lesion (13), secondary change (14), color (11), shape/surface (7) and vascular pattern (3). Six structural relations are read directly from annotations (HAS_CONCEPT, HAS_SKIN_TYPE, DIAGNOSED_AS, BELONGS_TO, IS_A, SUBCLASS_OF); five knowledge and inference relations are derived as follows.
Figure 1. DermKG schema: 8 node types (node counts) and 11 relation types (edge counts). Solid gray: structural relations read from annotations. Dashed blue: knowledge and inference relations derived from training statistics and clinical rules.
Disease profiles
Disease profiles (characterized_by): The prevalence of concept in disease is shrunk toward the global prevalence to stabilize rare diseases, with . An edge is created if and the lift , or if the concept is strongly enriched (lift , at least 3 images), which retains rare but discriminative findings such as telangiectasia in basal cell carcinoma.
Concept Co-occurrence
Concept Co-occurrence (co_occurs): Concept pairs with pointwise mutual information of at least 0.5 and at least 10 co-occurrences are linked.
Clinical Rules
Clinical Rules: (GOVERNED_BY, INDICATES, ACTIVATES). We encoded 20 rules from standard dermatological morphology [8], for example telangiectasia (papule nodule) basal cell carcinoma, burrow scabies, and friable (papule nodule) pyogenic granuloma. A rule’s premise is a conjunction of disjunctive clauses over concepts and its conclusion is a set of diseases or a category. Each rule is validated on the training split by its support, precision and lift , and assigned a strength: strong (lift , support ), moderate (lift ) or weak (lift ). For long-tail diseases not covered by expert rules, 17 additional one- or two-concept rules were mined from the training split (precision , lift ) and kept separate for ablation.
Leakage Control
Leakage Control: All label-dependent quantities (profiles, co-occurrence, rule strengths and mined rules) are computed on the training split only, and DIAGNOSED AS edges of validation and test images are removed from the inference graph.
Information Ceiling
Information Ceiling: A concept-only model maps identical concept vectors to identical outputs, so its accuracy is bounded by predicting the majority label of each distinct vector. We compute this in-sample oracle on all 3,230 images (an optimistic bound), and analogously for balanced accuracy using class-normalized counts.
Models
Baselines
Logistic regression, Bernoulli naïve Bayes, -nearest neighbors (Jaccard), random forest, gradient boosting and a multilayer perceptron were trained either directly on categories (flat) or on diseases with probabilities summed into categories (bottom-up). Class-balanced weighting was included in the hyperparameter grid where supported.
Non-parametric KG Models
Disease profiles are shrunk along the KG hierarchy (disease toward category toward super-category). KG-Mixture models each category as a mixture of its diseases’ Bernoulli profiles, , KG-Rule scores categories by the strength-weighted activated rules, and KG-Fusion combines the best baseline, KG-Mixture and rule scores log-linearly.
DermKG-Net
A graph neural network (two residual GCN [18] or GAT [19] layers, 128 dimensions) encodes the 215-node knowledge layer of DermKG (all node types except images and skin types) into embeddings . A lesion is represented by its KG-contextualized concept embeddings, , and scored against disease node embeddings as prototypes, . Category scores follow the IS_A relation, , and training minimizes a class-weighted category cross-entropy plus a disease cross-entropy. Variants use the full graph (GCN, GAT), the graph without rule edges, or no edges (identity adjacency, noKG), which keeps the architecture and objective but removes all graph structure.
Data
We use the SkinCon annotations [13] of the Fitzpatrick17k dataset [20]. Of 3,690 annotated images, 460 marked by dermatologists as not suitable for annotation were removed, leaving 3,230 images with binary labels for 48 concepts (mean 3.11 concepts per image). Each image carries one of 113 disease labels, which Fitzpatrick17k maps to 9 categories and 3 super-categories (benign, malignant, non-neoplastic). The category distribution is highly skewed: inflammatory conditions account for 65.1% of images and malignant dermal tumors for 0.8%. Images were split per disease into training, validation and test sets (70/10/20; 2,259/324/647 images); diseases with fewer than three images were placed in training.
Evaluation
The main task is 9-category diagnosis. Because of the class skew, macro-F1 and balanced accuracy are the primary metrics; accuracy, mean recall over the eight minority categories, and super-category balanced accuracy are also reported. Hyperparameters were selected on validation macro-F1, and DermKG-Net results are averaged over three seeds. 95% confidence intervals and paired differences use 1,000 bootstrap resamples of the test set.
Results
DermKG & Rule Validation
As shown in Figure 2, DermKG comprises 3,452 nodes and 19,365 edges in a single connected component (density , mean degree 11.2), including 411 disease profile edges, 86 co-occurrence edges and 37 rules. All 20 expert rules have lift above 1 on the training split (Figure 3a): 15 are strong and 5 moderate, with lifts from 2.1 (ulcerated or fungating nodule malignant epidermal tumor) to 46.7 (depigmented macule or patch vitiligo or halo nevus). At least one rule fires for 44.7% of test images; expert-rule coverage ranges from 32% (benign dermal) to 53% (malignant epidermal) of images across categories.

Figure 2. DermKG at increasing scale. (a) One node: basal cell carcinoma with its characteristic concepts (edge width and numbers give the smoothed , the rules indicating it, its category and a sample of its training images. (b) One category: the five malignant epidermal diseases with their concepts and the expert rules pointing to them. (c) One branch: the malignant super-category with 4 categories, 11 diseases, 18 concepts and 7 expert rules. (d) The complete graph (3,452 nodes, 19,365 edges): super-categories and categories at the center, diseases in category sectors, images (gray) beside their diagnosis, and rules, concepts and concept groups on the outer rings.
(a) Training-split validation of the 20 expert rules
(b) Information ceiling of concept-only diagnosis
Figure 3. (a) Lift versus support of the 20 expert rules on the training split. Dashed lines: strong-rule thresholds (lift 5, support 10); dotted line: moderate threshold (lift 2). All rules have lift above 1. (b) In-sample oracle ceilings of concept-only diagnosis at three hierarchy levels, with majority-class and chance references.
Information Ceiling
The 3,230 lesions map onto only 813 distinct concept vectors, and the five most frequent vectors cover 31% of images; the single description plaque + erythema alone accounts for 11.1%. The resulting ceilings (Figure 3b) are 38.9% top-1 accuracy for diseases, 77.6% for categories (majority class: 65.1%) and 82.2% for super-categories; the balanced-accuracy ceiling for categories is 62.3%. The same limitation appears in the KG: 29 of 113 diseases share an identical CHARACTERIZED_BY concept set with at least one other disease, in 10 groups, including malignant melanoma and superficial spreading melanoma.
Category-level Diagnosis
Table 2 summarizes test performance. The strongest baseline was bottom-up logistic regression with class-balanced weights (macro-F1 0.299, balanced accuracy 0.257). Like the other baselines and the non-parametric KG models, it achieved high accuracy (0.67 to 0.69) largely by predicting the majority category: mean minority recall was at most 0.18. KG-Mixture gave the best super-category accuracy (0.750) and the best fine-grained top-5 accuracy over 113 diseases (0.391, versus 0.332 to 0.372 for the bottom-up baselines), but did not improve category-level macro-F1 or balanced accuracy.
| Category | LogReg | KG-Mixture | DermKG-Net | |
| Inflammatory | 1470 | 0.924 | 0.943 | 0.605 |
| Malignant epidermal | 211 | 0.197 | 0.311 | 0.492 |
| Genodermatoses | 152 | 0.341 | 0.341 | 0.341 |
| Benign epidermal | 142 | 0.125 | 0.100 | 0.375 |
| Benign dermal | 125 | 0.189 | 0.108 | 0.162 |
| Malignant melanoma | 76 | 0.333 | 0.333 | 0.476 |
| Benign melanocyte | 34 | 0.200 | 0.000 | 0.700 |
| Cutaneous lymphoma | 31 | 0.000 | 0.000 | 0.000 |
| Malignant dermal | 18 | 0.000 | 0.000 | 0.400 |
Table 2. PER-CATEGORY TEST RECALL, SORTED BY THE NUMBER OF TRAINING IMAGES (). LOGREG: BOTTOM-UP LOGISTIC REGRESSION (STRONGEST BASELINE); DERMKG-NET: FULL-GRAPH GCN VARIANT.
DermKG-Net changed this trade-off. The best variant (without rule edges) reached a balanced accuracy of 0.411, a paired improvement of +0.150 (95% CI [0.073, 0.231]) over the strongest baseline, and raised minority recall from 0.173 to 0.389 and super-category balanced accuracy from 0.438 to 0.582. Its macro-F1 gain (+0.024, 95% CI [−0.029, 0.080]) was not significant, and overall accuracy decreased to 0.519 because fewer inflammatory lesions were predicted. Balanced accuracy reached 66% of the concept-only ceiling. Per category (Table I), recall gains were largest for benign melanocytic lesions (0.20 to 0.70), malignant melanoma (0.33 to 0.48), malignant epidermal tumors (0.20 to 0.49) and malignant dermal tumors (0 to 0.40); cutaneous lymphoma remained unrecognized by all models.
The ablations qualify the role of the graph. The noKG variant, with the same architecture and objective, already reached a balanced accuracy of 0.392, so most of the improvement is attributable to the hierarchical prototype objective; adding the hierarchy and profile edges raised it to 0.411 and macro-F1 from 0.308 to 0.326, while adding rule edges or attention did not help further.
| Group | Model | Acc | Macro-F1 [95% CI] | BalAcc [95% CI] | MinR | Acc | BalAcc | Top-1 | Top-5 |
| Reference | Majority class | 0.649 | 0.087 | 0.111 | 0.000 | 0.717 | 0.333 | – | – |
| Flat | LogReg | 0.677 | 0.256 [.202,.306] | 0.224 [.185,.268] | 0.133 | 0.740 | 0.443 | – | – |
| Flat | NaiveBayes | 0.643 | 0.254 [.208,.293] | 0.244 [.200,.290] | 0.164 | 0.703 | 0.469 | – | – |
| Flat | KNN | 0.572 | 0.217 [.179,.254] | 0.206 [.174,.239] | 0.135 | 0.645 | 0.433 | – | – |
| Flat | RandomForest | 0.660 | 0.229 [.191,.266] | 0.211 [.182,.245] | 0.124 | 0.723 | 0.441 | – | – |
| Flat | GradBoost | 0.680 | 0.261 [.217,.298] | 0.236 [.201,.271] | 0.149 | 0.740 | 0.463 | – | – |
| Flat | MLP | 0.688 | 0.247 [.206,.282] | 0.219 [.188,.251] | 0.126 | 0.745 | 0.441 | – | – |
| Bottom-up | LogReg | 0.674 | 0.299 [.241,.347] | 0.257 [.214,.306] | 0.173 | 0.730 | 0.438 | 0.121 | 0.332 |
| Bottom-up | NaiveBayes | 0.674 | 0.250 [.204,.288] | 0.219 [.184,.251] | 0.129 | 0.740 | 0.435 | 0.178 | 0.372 |
| Bottom-up | kNN | 0.572 | 0.217 [.179,.254] | 0.206 [.174,.239] | 0.135 | 0.645 | 0.433 | 0.136 | 0.260 |
| Bottom-up | RandomForest | 0.637 | 0.221 [.183,.255] | 0.204 [.173,.235] | 0.120 | 0.699 | 0.423 | 0.124 | 0.300 |
| Bottom-up | MLP | 0.675 | 0.207 [.166,.246] | 0.183 [.157,.212] | 0.085 | 0.737 | 0.407 | 0.181 | 0.371 |
| KG (non-param.) | KG-Rule | 0.680 | 0.244 [.204,.279] | 0.220 [.187,.253] | 0.128 | 0.740 | 0.437 | – | – |
| KG (non-param.) | KG-CatProfile | 0.643 | 0.254 [.209,.293] | 0.244 [.200,.290] | 0.164 | 0.706 | 0.470 | – | – |
| KG (non-param.) | KG-Mixture | 0.688 | 0.271 [.226,.309] | 0.237 [.202,.273] | 0.149 | 0.750 | 0.456 | 0.190 | 0.391 |
| KG (non-param.) | KG-Fusion w/o mixture | 0.657 | 0.272 [.225,.314] | 0.256 [.213,.303] | 0.177 | 0.717 | 0.483 | – | – |
| KG (non-param.) | KG-Fusion w/o rules | 0.688 | 0.271 [.226,.309] | 0.237 [.201,.273] | 0.149 | 0.750 | 0.456 | – | – |
| KG (non-param.) | KG-Fusion (expert rules) | 0.689 | 0.272 [.227,.310] | 0.238 [.202,.273] | 0.149 | 0.751 | 0.457 | – | – |
| KG (non-param.) | KG-Fusion | 0.688 | 0.271 [.226,.309] | 0.237 [.201,.273] | 0.149 | 0.750 | 0.456 | – | – |
| DermKG-Net | noKG | 0.518 | 0.308 [.265,.344] | 0.392 [.321,.467] | 0.366 | 0.598 | 0.552 | 0.134 | 0.369 |
| DermKG-Net | GCN | 0.522 | 0.312 [.269,.350] | 0.393 [.322,.467] | 0.367 | 0.600 | 0.555 | 0.130 | 0.379 |
| DermKG-Net | GAT | 0.523 | 0.309 [.263,.344] | 0.394 [.315,.462] | 0.368 | 0.606 | 0.570 | 0.133 | 0.374 |
| DermKG-Net | GCN w/o rules | 0.519 | 0.326 [.273,.364] | 0.411 [.331,.487] | 0.389 | 0.604 | 0.582 | 0.131 | 0.377 |
Table II (PDF p. 4). TABLE II. TEST RESULTS AT THREE LEVELS OF THE DIAGNOSTIC HIERARCHY. CATEGORY LEVEL (9 CLASSES): ACCURACY, MACRO-F1 AND BALANCED ACCURACY WITH 95% BOOTSTRAP CIS (1,000 RESAMPLES), AND MINR, THE MEAN RECALL OVER THE 8 MINORITY CATEGORIES. SUPER-CATEGORY LEVEL (3 CLASSES): ACCURACY AND BALANCED ACCURACY. DISEASE LEVEL (113 CLASSES): TOP-1 AND TOP-5 ACCURACY, REPORTED FOR MODELS THAT OUTPUT DISEASE PROBABILITIES. DERMKG-NET: MEAN OVER 3 SEEDS (MACRO-F1 STD ≤ 0.013). BEST VALUE PER COLUMN IN BOLD.
Interpretability & Error Analysis
Every DermKG prediction can be traced from concepts through activated rules to diseases and categories. For KG-Fusion, 37.4% of test predictions are backed by an expert rule, and these are more reliable (balanced accuracy 0.290 vs. 0.200). In Figure 4, a pyogenic granuloma activates rule R13, with friable and erythema as the main evidence for benign dermal.
Figure 4. Concept-level explanation of a test lesion (pyogenic granuloma): log-evidence of each concept for the predicted category (benign dermal, via pyogenic granuloma) versus the runner-up (genodermatoses, via neurofibromatosis). Rule R13 (friable papule or nodule → pyogenic granuloma, strong) also supports the prediction.
Errors are dominated by collapse into the majority category: the seven most frequent confusions are all minority lesions predicted as inflammatory, and 70.8% of errors share their exact concept vector with a training lesion of the predicted category, so they cannot be resolved from concepts alone.
case-level explanation and exposing diseases that are indistinguishable by description alone.
Discussion
Even with perfect, dermatologist-provided concepts, fine-grained diagnosis is bounded at 38.9% top-1 accuracy, because short descriptions such as erythematous plaque are shared by many diseases; improving concept prediction from images therefore cannot overcome this ceiling without information beyond the 48 concepts. Category-level diagnosis is far less constrained. Here the two KG model families are complementary: KG-Mixture gives the best fine-grained and super-category accuracy, whereas DermKG-Net gives the best balanced accuracy and minority recall, mainly through its hierarchical prototype objective. Beyond accuracy, DermKG makes diagnostic knowledge explicit and auditable, supporting
Conclusion
We presented DermKG, a concept-centric knowledge graph that links 48 dermatological concepts, 113 diseases and 20 data-validated clinical rules. Because the 3,230 lesions collapse onto only 813 distinct concept vectors, concept-only diagnosis is bounded at 38.9% top-1 accuracy for diseases but leaves substantial room at the category level, where DermKG-Net improved balanced accuracy from 0.257 to 0.411 over the strongest baseline. These results suggest that concept-based dermatology systems should be evaluated against the information ceiling of their concept vocabulary, and that structured clinical knowledge is most valuable where data are scarce and decisions must be explained.
References
References
- [1]A. Esteva, B. Kuprel, R. A. Novoa, et al., “Dermatologist-level classification of skin cancer with deep neural networks,” Nature, vol. 542, pp. 115–118, 2017.DOI
- [2]C. Huang, A. Yu, Y. Wang, and H. He, “Skin lesion segmentation based on Mask R-CNN,” in Proc. Int. Conf. Virtual Reality and Visualization (ICVRV), pp. 63–67, IEEE, 2020.
- [3]C. Huang, Y. Yu, and M. Qi, “Skin lesion segmentation based on deep learning,” in Proc. IEEE 20th Int. Conf. Communication Technology (ICCT), pp. 1360–1364, 2020.
- [4]C. Huang, A. Yu, and H. He, “Using combined Soft-NMS algorithm method with Faster R-CNN model for skin lesion detection,” in Proc. 6th Int. Conf. Robotics and Artificial Intelligence (ICRAI), pp. 5–8, ACM, 2020.
- [5]S. Yan, Z. Yu, C. Primiero, et al., “A multimodal vision foundation model for clinical dermatology,” Nature Medicine, vol. 31, no. 8, pp. 2691–2702, 2025.DOI
- [6]J. Zhou, X. He, L. Sun, et al., “Pre-trained multimodal large language model enhances dermatological diagnosis using SkinGPT-4,” Nature Communications, vol. 15, p. 5649, 2024.
- [7]R. Daneshjou, K. Vodrahalli, R. A. Novoa, et al., “Disparities in dermatology AI performance on a diverse, curated clinical image set,” Science Advances, vol. 8, no. 32, p. eabq6147, 2022.
- [8]J. L. Blognia, J. V. Schaffer, and L. Cerroni, Dermatology. Elsevier, 4th ed., 2018.
- [9]P. W. Koh, T. Nguyen, Y. S. Tang, et al., “Concept bottleneck models,” in Proc. ICML, pp. 5338–5348, 2020.arxiv.org/abs/2007.04612
- [10]T. Oikairinen, S. Das, L. M. Nguyen, and T.-W. Weng, “Label-free concept bottleneck models,” in Proc. ICLR, 2023.
- [11]C. Patrício, J. C. Neves, and L. F. Teixeira, “Coherent concept-based explanations in medical image and its application to skin lesion diagnosis,” in Proc. IEEE/CVF CVPR Workshops, pp. 3799–3808, 2023.
- [12]C. Kim, S. U. Gadgil, A. J. DeGrave, et al., “Transparent medical image AI via an image–text foundation model grounded in medical literature,” Nature Medicine, vol. 30, pp. 1154–1165, 2024.
- [13]R. Daneshjou, M. Yuksekgonul, Z. R. Cai, R. Novoa, and J. Zou, “SkinCon: A skin disease dataset densely annotated by domain experts for fine-grained debugging and analysis,” in NeurIPS Datasets and Benchmarks Track, 2022.
- [14]M. Rotmensch, Y. Halpern, A. Tlimat, et al., “Learning a health knowledge graph from electronic medical records,” Scientific Reports, vol. 7, p. 5994, 2017.
- [15]P. Chandak, K. Huang, and M. Zitnik, “Building a knowledge graph to enable precision medicine,” Scientific Data, vol. 10, p. 67, 2023.DOI
- [16]S. Yan, M. Hu, Y. Jiang, et al., “DermM: A million-scale vision-language dataset aligned with clinical ontology knowledge for dermatology,” in Proc. IEEE/CVF ICCV, pp. 12681–12690, 2025.
- [17]S. Yan, X. Li, M. Hu, et al., “Like-M: Multi-aspect knowledge-enhanced vision-language pretraining for zero-shot dermatological assessment,” in Proc. MICCAI, 2025.
- [18]T. N. Kipf and M. Welling, “Semi-supervised classification with graph convolutional networks,” in Proc. ICLR, 2017.arxiv.org/abs/1609.02907
- [19]P. Veličković, G. Cucurull, A. Casanova, et al., “Graph attention networks,” in Proc. ICLR, 2018.arxiv.org/abs/1710.10903
- [20]M. Groh, C. Harris, L. Soenksen, et al., “Evaluating deep neural networks trained on clinical images in dermatology with the Fitzpatrick 17k dataset,” in Proc. IEEE/CVF CVPR Workshops, pp. 1820–1828, 2021.
AI tools statement
No AI-use declaration is available for this version in Valency.
The available record does not establish whether AI systems or models contributed to this work.



