The clinical need for transparent and trustworthy AI in medical diagnostics, such as for melanoma, motivates a shift from "black-box" models to "ante-hoc" explainable systems. Capsule Networks (CapsNets) [43] are a promising architecture for this, as their capsules are intended to encode the presence and properties of distinct features. This thesis evaluates the ability of CapsNets to achieve true semantic alignment on a complex, real-world task: predicting 19 overlapping and correlated visual dermoscopic attributes from a novel, expert-annotated dataset [6]. This work first diagnoses a fundamental structural collapse in the standard Dynamic Routing by Agreement (DRA) algorithm, which converges to a high-entropy, trivial solution when applied to this complex data. To address this, we propose a Constrained Dynamic Routing by Agreement (CDRA), which introduces a persistent, trainable structural prior to stabilize the routing mechanism. Furthermore, we introduce two quantitative frameworks to move beyond subjective evaluation: a new metric, Capsule Activation Selectivity (CAS), and a quantitative perturbation analysis to rigorously measure capsule specialization. Results show that while the baseline model fails, the proposed CDRA model achieves strong predictive performance on a reduced 7-attribute set (Macro-AUPRC 0.497). However, our quantitative metrics (MIG ≈ 0.048 and CAS ≈ 1/(K − 1)) provide conclusive evidence that the model fails to achieve the "one-capsule-one-concept" alignment, exhibiting high representation redundancy. Despite this internal entanglement, a meta-model trained on the network’s predictions achieved strong downstream malignancy diagnosis (AUROC 0.868), proving the model’s outputs are semantically meaningful in aggregate. This study diagnoses a fundamental gap between the unsupervised routing mechanism and supervised objectives in CapsNets and contributes a rigorous quantitative framework for evaluating failure modes in ante-hoc XAI.
La necessità di metodi di Intelligenza Artificiale (IA) trasparenti ed affidabili in contesti clinici, come nel caso dei melanomi, motiva uno spostamento da modelli a "scatola nera" verso sistemi intrinsecamente spiegabili (ante-hoc). Le Capsule Networks (CapsNets) [43] sono un’architettura promettente per questo scopo, poiché le capsule sono pensate per codificare la presenza e le proprietà di caratteristiche dei dati. Questa tesi valuata la ca- pacità delle CapsNets di ottenere un vero allineamento semantico in un contesto complesso e reale: la previsione di 19 attributi dermoscopici visivi, sovrapposti e correlati, provenienti da un nuovo dataset annotato da esperti [6]. Questo lavoro diagnostica, innanzitutto, un collasso strutturale nell’algoritmo standard di routing dinamico, che converge verso una soluzione banale ad alta entropia quando applicato a questi dati complessi. Per risol- vere questo problema, proponiamo una versione vincolata dell’algoritmo di routing che introduce una "prior" strutturale persistente ed allenabile per stabilizzare il meccanismo originale. Inoltre, introduciamo metodi quantitativi per superare la valutazione sogget- tiva: una nuova metrica, la Capsule Activation Selectivity (CAS) e un’analisi quantitativa delle perturbazioni per misurare rigorosamente la specializzazione delle capsule. I risultati mostrano che, mentre il modello base fallisce, il modello CDRA proposto ot- tiene buone prestazioni predittive su un set ridotto di 7 attribute (Macro-AUPRC 0.497). Tuttavia, le nostre metriche quantitative (MIG ≈ 0.048 and CAS ≈ 1/(K −1)) forniscono prove conclusive che il modello non riesce a otterere l’allineamento "una-capsula-un- concetto", mostrando un’elevata ridondanza nella rappresentazione. Nonostante questo fenomeno di "entanglement" interno, un meta-modello allenato sulle previsioni della rete ha ottenuto ottimi risultati nella diagnosi della malignità (AUROC 0.868), dimostrando che gli output del modello sono semanticamente significativi nel loro complesso. Questo studio esamina il divario tra il meccanismo di routing non supervisionato e gli obiettivi supervisionati nelle CapsNets e contribuisce a definire un quadro quantitativo rigoroso per la valutazione dell’IA Spiegabile (XAI) ante-hoc.
Evaluating semantic alignment in capsule networks for predicting dermoscopic visual characteristics
CHIAPPINI, PAOLO
2024/2025
Abstract
The clinical need for transparent and trustworthy AI in medical diagnostics, such as for melanoma, motivates a shift from "black-box" models to "ante-hoc" explainable systems. Capsule Networks (CapsNets) [43] are a promising architecture for this, as their capsules are intended to encode the presence and properties of distinct features. This thesis evaluates the ability of CapsNets to achieve true semantic alignment on a complex, real-world task: predicting 19 overlapping and correlated visual dermoscopic attributes from a novel, expert-annotated dataset [6]. This work first diagnoses a fundamental structural collapse in the standard Dynamic Routing by Agreement (DRA) algorithm, which converges to a high-entropy, trivial solution when applied to this complex data. To address this, we propose a Constrained Dynamic Routing by Agreement (CDRA), which introduces a persistent, trainable structural prior to stabilize the routing mechanism. Furthermore, we introduce two quantitative frameworks to move beyond subjective evaluation: a new metric, Capsule Activation Selectivity (CAS), and a quantitative perturbation analysis to rigorously measure capsule specialization. Results show that while the baseline model fails, the proposed CDRA model achieves strong predictive performance on a reduced 7-attribute set (Macro-AUPRC 0.497). However, our quantitative metrics (MIG ≈ 0.048 and CAS ≈ 1/(K − 1)) provide conclusive evidence that the model fails to achieve the "one-capsule-one-concept" alignment, exhibiting high representation redundancy. Despite this internal entanglement, a meta-model trained on the network’s predictions achieved strong downstream malignancy diagnosis (AUROC 0.868), proving the model’s outputs are semantically meaningful in aggregate. This study diagnoses a fundamental gap between the unsupervised routing mechanism and supervised objectives in CapsNets and contributes a rigorous quantitative framework for evaluating failure modes in ante-hoc XAI.| File | Dimensione | Formato | |
|---|---|---|---|
|
2025_12_Chiappini_Executive_Summary.pdf
non accessibile
Descrizione: Executive Summary
Dimensione
3.55 MB
Formato
Adobe PDF
|
3.55 MB | Adobe PDF | Visualizza/Apri |
|
2025_12_Chiappini_Tesi.pdf
non accessibile
Descrizione: Tesi
Dimensione
16.97 MB
Formato
Adobe PDF
|
16.97 MB | Adobe PDF | Visualizza/Apri |
I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/10589/247256