facebookresearch / multihop_dense_retrieval

Multi-hop dense retrieval for question answering
Other
212 stars 22 forks source link

Why masking the 1st hop? #20

Closed yangky11 closed 2 years ago

yangky11 commented 2 years ago

Hi,

Thanks for releasing the code! I have a minor question about this piece of code: https://github.com/facebookresearch/multihop_dense_retrieval/blob/62eb2427e36a648a927c6e39bb4c748796f7b366/mdr/retrieval/criterions.py#L127-L130 I'm wondering what's the purpose of masking the 1st hop? Does it help the final experimental results? Thanks!

xwhan commented 2 years ago

Hi @yangky11, the reason behind this was to avoid labeling the 2-hop supporting passage as negatives. Sometimes, the hop order might not be obvious and this is especially true for comparison questions. This gave some improvements on some initial experiments.

yangky11 commented 2 years ago

That makes sense. Thank you!