Closed MrZilinXiao closed 1 year ago
Thanks for your attention. Refer to the snippet ”we adopt the weighted average function for 𝜙𝑟 to average embeddings of each words among C𝑟 to initialize these relation embeddings, which can inject the semantic knowledge of relations.“, the mean operation was performed for the initialization of relation embeddings (virtual label words). While the prior distributions discussed in Entity Knowledge Injection in Part 4.1 is mainly designed for virtual type words.
Wow. Thanks for your quick response. That helps a lot! Just to be clear, so the 𝜙𝑟 you mentioned is just an average operation without any extra parameters. Got misled by the probability distribution over the candidate set C𝑟
. Has your group tried assigning learnable parameters to each separate word?
Yes, the 𝜙𝑟 mentioned is just an average operation without any extra parameters. We have not tried optimizing learnable parameters for each separate word. And this may be a direction toward the better performance of KnowPrompt.
Great. Thanks for the clarification. Wish you guys success in future research careers!
Hi. Thanks for your great work.
The paper mentioned
weighted average function
on page 4, indicating embeddings of virtual words should be initialized with respect tothe probability distribution
. However, your code shows only amean
operation was performed. Is that a bug or does it just shows a negligible difference so that we could ignore it?Moreover, I am a little confused about
the probability distribution
. Is it still based on prior distributions discussed inEntity Knowledge Injection
in Part 4.1?Thanks in advance for your patience.
https://github.com/zjunlp/KnowPrompt/blob/8734c20b0e6b771a747013d3399afec02365f39f/lit_models/transformer.py#L167