fanyangxyz / neural-lp Goto Github PK
View Code? Open in Web Editor NEWDifferentiable Learning of Logical Rules for Knowledge Base Reasoning
License: MIT License
Differentiable Learning of Logical Rules for Knowledge Base Reasoning
License: MIT License
How can it be used to n-ary relation graphs and generate the logic rules
https://github.com/fanyangxyz/Neural-LP/blob/master/src/model.py#L213-L214
feed[self.queries] = [[q] * (self.num_step-1) + [self.num_query] for q in qq]
Why use many copy of q
?
Thank you @fanyangxyz
Hi @fanyangxyz ,
I am confused why formula (2) can be converted into to formula (5). It seems like these two formulae are not equivalent and there is no explanation in paper. Would you mind tell me more details about this?
I was wondering how you performed QA task explained in Section 4.4 of your paper.
I could process the dataset to match the input format of Neural LP and I could produce rules for the dataset in the exps/demo/
directory, but I do not know what to do next. Could you please elaborate more on this task?
I tried to run the code as the readme suggested. I got the following error:
Traceback (most recent call last):
File "src/main.py", line 6, in
from model import Learner
File "~/Neural-LP-master/src/model.py", line 207
lambda (grad, var): self._clip_if_not_None(grad, var, -5., 5.), gvs)
^
SyntaxError: invalid syntax
We want to predict the probability over all the M.
What is the function of query
as place_holder input.
Thank you.
@fanyangxyz
What are α and β of the paper in the code?
I guess they may be in src/model.py
Thank you.
Thank you.
Thank you.
@fanyangxyz
Hi
Thank you for this code.
I think these edits would help people running the code:
.eval/collect_all_facts.sh datasets/family
python eval/get_truths.py datasets/family
python eval/evaluate.py --preds=exps/family/test_predictions.py --truths=datasets/family/truths.pckl
I know M_R is a matrix of shape |E|×|E| as the paper write:
Thank you.
Thank you.
Thank you.
@fanyangxyz
Hi,
Nice work!
Can I know where the inductive dataset is located? Or the exact parameters (random sample of test entities etc ) required to build the inductive dataset as mentioned in the paper ?
Thanks
Hi @fanyangxyz ,
Can Neural-LP be modelled to generate the set of rules in the presence of incorrect and negative facts in the database? Basically, the rules should cover as many facts as possible from the positive (facts.txt) and as little negatives as possible from a negatives.txt
1,
A lives in C. (A, liveInCity, C)
B lives in C. (B, liveInCity, C)
Does A and B live in the same city?
2,
A is 180 cm height. (A, height, 180)
B is 175 cm height. (B, height, 175)
Is B taller than A?
Thank you very much.@fanyangxyz
@fanyangxyz Do you plan to release the other datasets and the experimental framework of the NIPS 2017 paper ? It would be very helpful for research purposes.
Thanks!
@fanyangxyz : In the code starting at:
Line 148 in cbb6a9d
I am a little confused in this part. Could you please explain ?
Further, I assume https://github.com/fanyangxyz/Neural-LP/blob/master/src/model.py#L149 is Eq 11 in the paper. However, the indices seem to not match the equation. In the equation, you have softmax([h_0 .. h_{t-1}]^T h_t)
but the code seems to suggest softmax([h_0 .. h_{t}]^T h_t)
It would be really great if you could explain this discrepancy. Thanks
Thank you
@fanyangxyz
I want to know the fairness of this experiment.
The article describes how to handle test sets and training sets. But Neural-LP reasons based on known facts and rules. The facts is splited from the initial train data and contains tuples share entities with selected test tuples.
In order to ensure fairness, different models should use the same data. I want to know the data you use to train TransE because I think it is not the union of facts and train for Neural-LP. What's your interpretation of the fairness of this experiment?
which dataset was used in Section 4.2 "Grid path finding"? I can't find the code of this task in your dir, could u give some more details? thank u~
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.