bran icon indicating copy to clipboard operation
bran copied to clipboard

All candidate pair scores?

Open sunilitggu opened this issue 6 years ago • 4 comments

Hi I was trying to understand the code. I found that you are feeding an abstract separately for each candidate pair of the abstract in the model. However, in the paper, it is written once for all candidate pairs.

Am I missing something?

Thanks

sunilitggu avatar Apr 29 '18 16:04 sunilitggu

Currently the code is doing some redundant computation, re-encoding the abstract for each entity pair. However, it is computing the full pairwise score tensor without any entity pair specific features which you can access here https://github.com/patverga/bran/blob/master/src/models/transformer.py#L468 . You can compute that tensor once and then aggregate scores for each of the entity pairs. This can be done efficiently using a gather/scatter but is not currently implemented.

patverga avatar May 01 '18 19:05 patverga

Hi,

In the above link, a few lines above, it seems e1_mask and e2_mask are not used in any way. How does the model know the locations of the tokens of the current entity pairs?

Thanks!

leebird avatar May 20 '19 08:05 leebird

Ah, never mind, just saw the ep_dist list.

leebird avatar May 20 '19 17:05 leebird

Ah, never mind, just saw the ep_dist list.

Did you know what exactly ep_dist_batch represents? I saw that ep_dist_batch is added to pairwise_scores in code (here) directly.

Thanks!

nefujiangping avatar Nov 03 '19 07:11 nefujiangping