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

[GraphSage] Allow "patience" with "tolerance" when training #252

Open
giahung24 opened this issue Mar 1, 2023 · 2 comments
Open

[GraphSage] Allow "patience" with "tolerance" when training #252

giahung24 opened this issue Mar 1, 2023 · 2 comments
Labels
feature request A suggestion for a new feature good first issue Indicates a good issue for first-time contributors

Comments

@giahung24
Copy link

Is your feature request related to a problem? Please describe.

I had a training round stopped just after 2 iterations where the loss did not reduce (loss delta < tolerance). This is not very efficient as "early stopping" strategy.

Describe the solution you would like

It should be patience a little more, like checking if the loss doesn't reduce after n iterations, hence introduced a new hyper-param 'patience': number of ite with no improvement after which training will be stopped. Currently, this 'patience' is just 1.

@giahung24 giahung24 added the feature request A suggestion for a new feature label Mar 1, 2023
@giahung24
Copy link
Author

image
for example : 10 minute of batches preparing then algo exits after 2 iterations...

@FlorentinD
Copy link
Contributor

Hey @giahung24 ,
thanks for your feedback!

Adding a patience parameter sounds like a great idea. Actually we already have most of the logic in place for our Logistic Regression training where we already expose an patience parameter.

We will add it to our backlog and inform you when we added this feature.
For now, you could try to increase the tolerance as a workaround.

Alternatively, would you be interested in implementing this yourself?
I think it could suit as a good first issue.
The main logic is inside org.neo4j.gds.embeddings.graphsage.GraphSageModelTrainer#trainEpoch. And the patience is could be used through org.neo4j.gds.ml.gradientdescent.StreakStopper.

@FlorentinD FlorentinD added the good first issue Indicates a good issue for first-time contributors label Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A suggestion for a new feature good first issue Indicates a good issue for first-time contributors
Projects
None yet
Development

No branches or pull requests

2 participants