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

Issue with continuous-value-predicting LSTM results #35

Open
jdiaz4302 opened this issue Aug 5, 2022 · 0 comments
Open

Issue with continuous-value-predicting LSTM results #35

jdiaz4302 opened this issue Aug 5, 2022 · 0 comments

Comments

@jdiaz4302
Copy link

As a first step in using these tools, I am trying to get training set influence for a small LSTM (~1000 weights) and toy-sized data set (train_n and test_n = 100).

After making very few adjustments (i.e., changing the nll_loss to mse_loss), I can get results running the following

ptif.calc_influence_function.calc_influence_single(
    model,
    train_loader,
    test_loader,
    np.argmax(y_test).item(), # trying to get influence regarding the most extreme set instance
    gpu = -1,
    recursion_depth = 1,  # setting this up to 5 also works but takes longer, anything above 5 seems memory-prohibitive
    r = 1 # setting this up to 5 also works but takes longer, anything above 5 seems memory-prohibitive
)

The results are consistent between multiple calls to the function, but they correlate very poorly with leave-one-out training results.

ptif_influence_results

Do you know if I am using this incorrectly or if there is any fixable reason why the implementation may perform poorly for an LSTM predicting continuous values (most examples that I see are using CNN architectures for image classification)

If useful, my fork containing those minimal changes can be found here - https://github.com/jdiaz4302/pytorch_influence_functions

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

1 participant