mims-harvard/GraphXAI

Metrics Calculation Confusion

wsloneker opened this issue · 1 comments

Thanks for your efforts! I had a quick question on the calculation for graph_exp_faith in the metrics.py file.

I just wanted to clarify why after the model results on all data was calculated and softmax applied, that the log was taken, but the log wasn’t applied after applying the softmax to the model results on the perturbed dataset.* Thanks for the clarification.

*1 - torch.exp(-F.kl_div(org_softmax.log(), pert_softmax, None, None, 'sum')).item()

Hey wsloneker,

Thank you for your interest in our work. We did this because the default value for the "log_target" argument in the KL_div function is set to False. Please check out the link below for a more detailed description of the official PyTorch documentation.

https://pytorch.org/docs/stable/generated/torch.nn.KLDivLoss.html#torch.nn.KLDivLoss