medgift / iMIMIC-RCVs

This repository contains the code for implementing Bidirectional Relevance scores for Digital Histopathology, which was used for the results in the iMIMIC workshop paper: Regression Concept Vectors for Bidirectional Explanations in Histopathology
MIT License
16 stars 6 forks source link

how to explain sensitivity scores #2

Closed khatiakilanava closed 5 years ago

khatiakilanava commented 5 years ago

Hello, First of all, thank you for sharing your code.

I have used your method to explain my own network, that is trained on 32x32 image patches to identify breast cancer cells from healthy cells. I have calculated 3 concepts with the way you have: ASM, Correlation and Concept. Correlation values I got are as follows: Correlation -0.38 ; Contrast 0.44 and ASM 0.32. My first question is: for the sensitivity scores as well as for BR scores, the magnitude for those three concepts are the same but the sign is different. My BR scores look like this: Correlation 0.92, Contrast -0.32 ASM -0.006. As you see here correlation has a positive sign. Now I am wondering why this happened and how to explain global predictions, does correlation concept results in positive or negative prediction? Based on the pearson correlation values, correlation concept results in negative whereas based on BR scores it results in positive that arises my confusion. My second question is regarding Sensitivity scores. I have the same magnitude across those 3 concepts between cancerous and non cancerous image patches. Specifically, correlation value always has a higher magnitude(positive) than other two concepts, and the Contrast highest negative. How can I specifically use the sensitivity score for local explanation, to say why specific image was predicted as positive class and why negative class? I can not capture a difference in sensitivity scores across different classes.

Thank you!

maragraziani commented 5 years ago

Hi @khatiakilanava,

thank you for your question. I need more details about the network you are using, the dataset and labels to answer your questions more in detail. For this reason, I encourage you to send me more info, being as much exhaustive as you can (emails should work).

From what I see, I can just point out a few points:

  1. The way you extract the concept measures is particularly relevant. What dataset are you using? Correlation at 0.92 and ASM at 0.32 is quite weird to me, as these two concepts should be positively correlated.
  2. Sensitivity scores depend on the network and on the rcv. What network are you using? What is the network performance on your dataset? What is the determination coefficient of the RCVs and at what layer are you actually extracting the embeddings?

Finally, your final results seem to actually match the main result in the paper, with contrast being highly indicative of tumor patches, and correlation being highly indicative of non-tumor patches. If I imagine correctly, you are probably using a single node to classify both classes, and that is the reason why you find the same behavior in the two classes. However, information about the classes is already encoded in bidirectional scores, with tell you more about how globally the model sees tumor and non-tumor patches.