TRAIS-Lab / dattri

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

[dattri.algorithm] Modify TracIn score computation loop #72

Closed tingwl0122 closed 3 months ago

tingwl0122 commented 3 months ago

Description

This PR experiments with the usage of vmap on TracIn and also modify the io of TracIn. Other slight modifications are also taken.

1. Motivation and Context

To improve the efficiency and clarity of TracIn.

2. Summary of the change

3. What tests have been added/updated for the change?

tingwl0122 commented 3 months ago

@TheaperDeng Hi, this is a naive way to incorporate vmap, which indeed needs to tweak the definition of target_func to only receive params, data instead of params, dataloader. Please let me know whether this makes sense.

TheaperDeng commented 3 months ago

Please merge this if you have nothing to add.

tingwl0122 commented 3 months ago

Please merge this if you have nothing to add.

I will merge after checking IF's performance on CIFAR-2 (if they perform similarly bad, then I will merge)

tingwl0122 commented 3 months ago

Please merge this if you have nothing to add.

I will merge after checking IF's performance on CIFAR-2 (if they perform similarly bad, then I will merge)

Confirmed the performance on Cifar-2, the poor performance is not unique for TracIn.