malllabiisc / EmbedKGQA

ACL 2020: Improving Multi-hop Question Answering over Knowledge Graphs using Knowledge Base Embeddings
Apache License 2.0
412 stars 95 forks source link

About ComplEx score calculation #124

Closed AOZMH closed 1 year ago

AOZMH commented 1 year ago

Thanks @apoorvumang for the amazing repo!

I'm a bit confused about your implementation of the ComplEx function (code) in which you return ac+bd as the real part of (a+bi)*(c+di) (the product of score and tail). Should this actually be ac-bd as you've done in the code above?

Any comments will be appreciated!

AOZMH commented 1 year ago

Solved. According to the ComplEX function, the tail vector should be conjugated (i.e. calculating (a+bi)*(c-di) with real part ac+bd), the code is correct to this regard.