Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusion about Gradient-based Relevance Computation #4

Open
712Zch opened this issue Jun 16, 2023 · 1 comment
Open

Confusion about Gradient-based Relevance Computation #4

712Zch opened this issue Jun 16, 2023 · 1 comment

Comments

@712Zch
Copy link

712Zch commented Jun 16, 2023

Could you please explain the formula for Gradient-based Relevance Computation in more detail, I notice you have explained in your blog.
Part code:

z = self.layer.forward(a) + self.eps
        s = (r / z).data
        (z * s).sum().backward()
        c = a.grad
        r = (a * c).data

Part formula:
image

There are some questions:

  1. Why wij can represent by
    image, and the i' represents what.
    2.sj is also an equation about a, sj is treated as a constant is not correct.
    3.What is the relationship between zj(a; w) and image.
@dwil2444
Copy link

dwil2444 commented Oct 18, 2023

@kaifishr I have a similar question to @712Zch :
How can we go from $$c_{i} = \sum_{j} w_{ij}s_{j}$$ to the expression containing the composition:

$$ = \sum_{j} s_{j} \frac{\partial}{\partial a_{i}} \left( \sum_{i^{\prime}} a_{i^{\prime}} w_{i^{\prime} j} \right)$$

You mentioned that $c_{i}$ is expressed as an element of a gradient in the space of input activations, a where $s_{j}$ is treated as a constant.

I am not sure that we can do this, since $s_{j}$ is itself a function of the input activations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants