ankurtaly / Integrated-Gradients

Attributing predictions made by the Inception network using the Integrated Gradients method
600 stars 98 forks source link

Using Trapezoidal Rule Instead of Left Riemann Sum #14

Closed matthewsot closed 5 years ago

matthewsot commented 5 years ago

Hello! In our preprint (https://arxiv.org/abs/1908.06214) we have compared (Section 4, Table 2) the accuracy of different integral approximation methods for approximating IG, and found that using the trapezoidal rule instead of a left-Riemann sum can lead to significant accuracy improvement. This PR makes that change in integrated_gradients.py, along with a comment for justification. We talked with Mukund about this a few months ago about this.

ankurtaly commented 5 years ago

Hi Matthew,

Thanks so much for the PR! I will take a look and get back to you very soon (hopefully by end of this week). I look forward to reading your paper too :)

Best, Ankur.

ankurtaly commented 5 years ago

Thank you so much for this fix Matthew!