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

Imposing Type Constraints for Link Prediction #55

Closed
pmitra01 opened this issue Jun 6, 2018 · 4 comments
Closed

Imposing Type Constraints for Link Prediction #55

pmitra01 opened this issue Jun 6, 2018 · 4 comments

Comments

@pmitra01
Copy link

pmitra01 commented Jun 6, 2018

Hi,
I was investigating the functionality around imposing type constraints - via the type_constrain.txt file.
If i understand correctly, this has not been implemented for link-prediction yet, has it? Only triple_classification appears to be dependent on it, and the training of a model for triple classification on FB15K returns a segmentation fault when type_constrain.txt is removed.
I have tried to understand the underlying implementation of type constraints in your code base, but have not been able to grasp it as clearly yet. Any elaboration on this would be much appreciated.

It would be interesting if type constraints are imposed on the link prediction task as one can force certain examples to label 0 based on the type constraints, which I feel would add valuable negative examples for learning. Otherwise, with uniform sampling for negative triples across the entire unrestricted range of entities, as is done now, we often return triples that could have directly been labeled as negative.

Is this something we can implement here for link prediction? Or am I missing something?

Thanks!

@ShulinCao
Copy link
Member

I have impose type constraints for link prediction. Just try it!

@pmitra01
Copy link
Author

pmitra01 commented Jun 7, 2018

Hi,
Thanks for the prompt response. Which flag controls the incorporation of type constraints into the model? I could not find an appropriate argument in the config module. Thanks, in advance!

@ShulinCao
Copy link
Member

con.set_link_prediction(True)

@pmitra01
Copy link
Author

pmitra01 commented Jun 8, 2018

Ah, I just saw the commit you made yesterday. That was real quick, thanks! I shall try it out. :)

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

3 participants