Skip to content
This repository has been archived by the owner on Nov 18, 2023. It is now read-only.

Improve learning stability #101

Merged
merged 8 commits into from
Oct 2, 2019
Merged

Conversation

jmsfltchr
Copy link
Contributor

@jmsfltchr jmsfltchr commented Oct 2, 2019

What is the goal of this PR?

Improve the stability of the model training process. Too much effort is required by the model to predict elements of the graph that are preexisting. These elements are far more numerous than the relations to be predicted, and so they dominate the priorities of the loss function.

We are also disinterested in predicting the class of edges, we wish only to predict the existence of relation nodes. We should take the view that the roleplayer edges of a relation are attached, and thereby are predicted to exist if their relation is predicted to exist.

What are the changes implemented in this PR?

Efforts to improve the stability and consistency of model training.

  • The loss function now:
    • Ignores all edges
    • Ignores all nodes which are marked as preexisting in the graph
  • A new metric for accuracy is added to only measure the accuracy for nodes (excluding preexisting nodes)
  • A larger dataset is used to reduce discrepancies between training and generalisation sets
  • Add a stringent constraint of a minimum of 70% accuracy on training and generalisation sets for the end-to-end test to pass
  • Decrease the default number of training iterations since convergence is now typically faster and there are more examples to process

@jmsfltchr jmsfltchr added this to the 0.2.1 milestone Oct 2, 2019
@jmsfltchr jmsfltchr self-assigned this Oct 2, 2019
Copy link
Member

@flyingsilverfin flyingsilverfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@@ -56,6 +56,7 @@ assemble_pip(
'pyparsing==2.4.2',
'python-dateutil==2.8.0',
'pytz==2019.2',
'scipy==1.3.1',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wonder if there is a way to make the BUILD consume the requirements.txt so you don't have to keep them in sync manually

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's in the pipeline!

@jmsfltchr jmsfltchr merged commit 8f015cd into typedb:master Oct 2, 2019
@jmsfltchr jmsfltchr deleted the learning-stability branch October 2, 2019 15:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants