ANALOGY icon indicating copy to clipboard operation
ANALOGY copied to clipboard

More explanation about the core code

Open wanpifeng4ever opened this issue 7 years ago • 1 comments

Hi, I recently read the paper and cannot understand the idea of Analogy Model and also its implementation. It seems that the score function in line 574~590 of the main.cpp is the hybrid between Distmult and ComplEx models. How exactly is it related to the formulation of Analogy model in the paper? Thanks for any help.

wanpifeng4ever avatar Nov 14 '17 09:11 wanpifeng4ever

You're right that it can be viewed as the hybrid of DistMult and ComplEx. Let's assume the relational matrix in ANALOGY consists of $a$ real scalars and $b$ 2x2 blocks, it is not hard to verify that its score function can be decomposed as the summation of the DistMult score of embedding size $a$ and the ComplEx score involving $b/2$ complex numbers.

quark0 avatar Nov 14 '17 16:11 quark0