TRAIS-Lab / dattri

`dattri` is a PyTorch library for developing, benchmarking, and deploying efficient data attribution algorithms.
https://trais-lab.github.io/dattri/
MIT License
28 stars 8 forks source link

[dattri.algorithm] Base attributor class for RPS #55

Closed tingwl0122 closed 4 months ago

tingwl0122 commented 4 months ago

As written in #32 , our current base class for attributor takes an input: target_func, which is the function to be attributed. However, for RPS, we care more about the model itself (and also its intermediate layer), we don't need any grad/hessian either.

@TheaperDeng, Should we still need to follow the same base class as IF and TracIn?

tingwl0122 commented 4 months ago

Oh, just found that we indeed need the gradient to calculate the $\alpha$ in the paper (the gradient of loss w.r.t. output). So, I think I can still keep the parameter target_func, but with an additional model as input

tingwl0122 commented 4 months ago

Hi @TheaperDeng, I think although RPS indeed needs some gradient computation, it is not w.r.t. params like IF or TracIn so the issue remains.

tingwl0122 commented 4 months ago

Closed this issue since this topic will be exclusively covered in #57