|
7 | 7 | [](https://circleci.com/gh/pytorch/captum)
|
8 | 8 |
|
9 | 9 | Captum is a model interpretability and understanding library for PyTorch.
|
10 |
| -Captum means comprehension in latin and contains general purpose implementations |
| 10 | +Captum means comprehension in Latin and contains general purpose implementations |
11 | 11 | of integrated gradients, saliency maps, smoothgrad, vargrad and others for
|
12 | 12 | PyTorch models. It has quick integration for models built with domain-specific
|
13 | 13 | libraries such as torchvision, torchtext, and others.
|
@@ -175,12 +175,12 @@ Convergence Delta: tensor([2.3842e-07, -4.7684e-07])
|
175 | 175 | The algorithm outputs an attribution score for each input element and a
|
176 | 176 | convergence delta. The lower the absolute value of the convergence delta the better
|
177 | 177 | is the approximation. If we choose not to return delta,
|
178 |
| -we can simply not provide `return_convergence_delta` input |
| 178 | +we can simply not provide the `return_convergence_delta` input |
179 | 179 | argument. The absolute value of the returned deltas can be interpreted as an
|
180 | 180 | approximation error for each input sample.
|
181 | 181 | It can also serve as a proxy of how accurate the integral approximation for given
|
182 | 182 | inputs and baselines is.
|
183 |
| -If the approximation error is large, we can try larger number of integral |
| 183 | +If the approximation error is large, we can try a larger number of integral |
184 | 184 | approximation steps by setting `n_steps` to a larger value. Not all algorithms
|
185 | 185 | return approximation error. Those which do, though, compute it based on the
|
186 | 186 | completeness property of the algorithms.
|
@@ -224,7 +224,7 @@ in order to get per example average delta.
|
224 | 224 |
|
225 | 225 |
|
226 | 226 | Below is an example of how we can apply `DeepLift` and `DeepLiftShap` on the
|
227 |
| -`ToyModel` described above. Current implementation of DeepLift supports only |
| 227 | +`ToyModel` described above. The current implementation of DeepLift supports only the |
228 | 228 | `Rescale` rule.
|
229 | 229 | For more details on alternative implementations, please see the [DeepLift paper](https://arxiv.org/abs/1704.02685).
|
230 | 230 |
|
@@ -286,7 +286,7 @@ In order to smooth and improve the quality of the attributions we can run
|
286 | 286 | to smoothen the attributions by aggregating them for multiple noisy
|
287 | 287 | samples that were generated by adding gaussian noise.
|
288 | 288 |
|
289 |
| -Here is an example how we can use `NoiseTunnel` with `IntegratedGradients`. |
| 289 | +Here is an example of how we can use `NoiseTunnel` with `IntegratedGradients`. |
290 | 290 |
|
291 | 291 | ```python
|
292 | 292 | ig = IntegratedGradients(model)
|
@@ -338,7 +338,7 @@ It is an extension of path integrated gradients for hidden layers and holds the
|
338 | 338 | completeness property as well.
|
339 | 339 |
|
340 | 340 | It doesn't attribute the contribution scores to the input features
|
341 |
| -but shows the importance of each neuron in selected layer. |
| 341 | +but shows the importance of each neuron in the selected layer. |
342 | 342 | ```python
|
343 | 343 | lc = LayerConductance(model, model.lin1)
|
344 | 344 | attributions, delta = lc.attribute(input, baselines=baseline, target=0, return_convergence_delta=True)
|
@@ -412,6 +412,8 @@ See the [CONTRIBUTING](CONTRIBUTING.md) file for how to help out.
|
412 | 412 | ## Talks and Papers
|
413 | 413 | The slides of our presentation from NeurIPS 2019 can be found [here](docs/presentations/Captum_NeurIPS_2019_final.key)
|
414 | 414 |
|
| 415 | +The slides of our presentation from KDD 2020 tutorial can be found [here](https://pytorch-tutorial-assets.s3.amazonaws.com/Captum_KDD_2020.pdf) |
| 416 | + |
415 | 417 | ## References of Algorithms
|
416 | 418 |
|
417 | 419 | * `IntegratedGradients`, `LayerIntegratedGradients`: [Axiomatic Attribution for Deep Networks, Mukund Sundararajan et al. 2017](https://arxiv.org/abs/1703.01365) and [Did the Model Understand the Question?, Pramod K. Mudrakarta, et al. 2018](https://arxiv.org/abs/1805.05492)
|
|
0 commit comments