Closed Aqudi closed 1 year ago
Hi. Thanks for your interests in our work!
Congrats, seems you are using the interpret_rule
function correctly. Each line outputted by function interpret_rule
is a compact representations for the learned rules. As we visualized in Figure 7 of the paper, each rule is a relation chain with logical functions attached to each node in the chain.
Therefore, in each line you can see a "backbone" formed by --
, which represent that "relation chain". Lets take the 4-th line as example which has a higher prob. There X--daughter^T--nephew
is such a relation chain, with X being the first variable in the chain. If the relation is marked with ^T
, it means a reversed relation. More precisely, this line's chain can be written as $\text{daughter}(y, x) \land \text{nephew}(z, y)$. So if $y$ is the daughter of $x$ and nephew of $z$, then $z$ is the brother of $x$.
All (AND ...)
components then mean logical functions applied to each node. They are written in a recursive manner, following the same format to the main chain. If multiple exists for the same node, as in the last line, then these two functions are applied to the same node. This usually happens when a relation link in the main chain is an identity function, e.g., $\text{equal}(\cdot, \cdot)$, so that the logical functions applied to the two nodes actually refer to the same entity variable.
Logical operators such as And
(this is different from capitalized AND
!) and Not
mean what they are supposed to mean. For example, (AND Not(wife))
means a function $\not\exists z, \text{wife}(z, \cdot)$.
Please note that, LERP is in design a continuous model, with extensive mixed operators. This is why the confidence score are uniformly low, which basically means that the LERP also allocates weights to other possibilities. You might observe higher scores if the model size is small, and lower scores if the model size is large. Each interpreted rule is actually greedily selected, so they cannot fully represent the computation of the actual rule and is only a maximal approximate. Some interpreted rules are not totally right (like the 4th line, where a daughter actually cannot be a nephew), but the model might be mixing multiple things and results in such a interpretation, or simply trying to be compatible with annotation randomness.
The Bridged_LerpModel
is actually more complex, mainly designed for representing more complicated rules in a compact size. This is why I have not written an interpretation function for it. However you are free to manually inspect its weights or propose a good solution for it!
Thank you!!! It was very helpful
Hi, I tried to generate rules after training with the LERP training script you uploaded. I got the following results, can you tell me how to interpret them?
Also, after training on WN18 and WN18RR datasets, how can I check the trained rules?
script:
generated rules:
If you can tell me how to extract the trained rules and interpret them, it will be very helpful for me to find the rules in the dataset.