salesforce / fast-influence-functions

BSD 3-Clause "New" or "Revised" License
82 stars 18 forks source link

How to justify the convergence of estimating the Hessian Vector Product? #14

Closed LinkToPast1990 closed 3 years ago

LinkToPast1990 commented 3 years ago

Hi, @HanGuo97 Do we check the convergence of estimating the hvp by empirically tracking the estimate_norm_diff? Thanks!

                pbar.update(1)
                if verbose is True:
                    new_estimate_norm = new_estimate[0].norm().item()
                    last_estimate_norm = last_estimate[0].norm().item()
                    estimate_norm_diff = new_estimate_norm - last_estimate_norm
                    pbar.set_description(f"{new_estimate_norm:.2f} | {estimate_norm_diff:.2f}")
HanGuo97 commented 3 years ago

In principle, I think any reasonable methods would do the job (e.g., checking how the norm grows, etc). The code snippet you show tracks the growth of norm of the first element, which is just a faster, more-convenient, but likely accurate proxy.