# Retinitis Pigmentosa Classification with Deep Learning and Integrated Gradients Analysis
## 3 Results
\begin{table}
\begin{tabular}{c c c c c|c c c c|c c c c|c} \hline \hline  & & \multicolumn{4}{c}{**Inception-v3**} & \multicolumn{4}{c}{**ResNet-50**} & \multicolumn{4}{c}{**VGG19**} \\ \cline{3-13}  & **Gene** & **Prec \({}^{*}\)** & **Rec \({}^{*}\)** & **F1 \({}^{*}\)** & **AUC \({}^{*}\)** & **Prec** & **Rec** & **F1** & **AUC** & **Prec** & **Rec** & **F1** & **AUC** & **Sup \({}^{*}\)** \\ \hline \multirow{10}{*}{} & _EYS_ & 0.56 & 0.66 & 0.61 & 0.88 & **0.64** & 0.68 & 0.66 & **0.91** & 0.60 & **0.75** & 0.66 & **0.91** & 87 \\  & _RPGR_ & **0.77** & **0.64** & 0.70 & **0.88  
By analyzing the confusion matrices in Figures 3-5, it is possible to draw better conclusions from these results through deeper analysis, which provides a clear view of how each gene was classified. In the Inception-v3 model, most of the true positives are correctly aligned along the diagonal, showing that the model performed well for many classes of genes. This suggests that genes with more training samples were classified accurately. Figure 4: Confusion matrix of the ResNet-50 model on the test set in percentage (%). Figure 3: Confusion matrix of the Inception-v3 model on the test set in percentage (%). Interpretation with Integrated Gradients (IGs)  
Explainability and interpretability are crucial when developing machine learning models in healthcare, as clinicians and researchers require more than just predictive accuracy. To this end, we applied integrated gradients (IGs) to understand better how the model arrived at its predictions. Two IG visualizations were generated: one for a correct prediction and another for a wrong prediction (Figures 6 and 7). Each of these examples compares the original image, the IG mask highlighting important features, and the overlap. The IG overlay highlights the regions that the model used to decide. In the case of a correct prediction, retinal areas with pathological changes were highlighted, namely  
Figure 5: Confusion matrix of the VGG19 model on the test set in percentage (%). Figure 6: Integrated gradients visualization on a correct prediction. Figure 7: Integrated gradients visualization on a wrong prediction. around vascular arcades and outside the central macula. The IG visualization effectively demonstrates the model's ability to focus on the relevant retinal features associated with the target gene, giving confidence in the biological plausibility of the model's decision-making process. However, when looking at a wrong prediction, the IG visualization still shows that the model valued areas of the retina preserved by the disease, i.e., areas without pathological changes, as seen in this example within the vascular arcades excluding the altered fovea. This suggests that the model did not use the same regions to make the predictions, although it is expected that the model will focus on potentially relevant areas of the image. This behavior may reflect the global representations learned, which did not allow the model to learn the areas it should pay attention to due to the small number of samples it had available to train. As a result, the model's difficulty in separating classes of similar genes increases. This insight further supports the need for an expanded dataset to represent underperforming gene classes better.