Coopercoppers / PFN

EMNLP 2021 - A Partition Filter Network for Joint Entity and Relation Extraction
MIT License
171 stars 20 forks source link

Small inconsistency, or not? #10

Closed vseledkin closed 2 years ago

vseledkin commented 2 years ago

Here

https://github.com/Coopercoppers/PFN/blob/6173b3e6b048d1307766ee5d2f8178b30d6675b2/PFN-nested/model/pfn.py#L271

we see

re_tail_score = self.re_tail(h_share, h_re, mask)

i think it should be

re_tail_score = self.re_tail(h_re, h_share, mask)

just from gradient flow considerations we actually have two almost identical modules, but with inputs being swapped h_re and h_share have gradients from upper layers for semantically different tasks/losses. Besides of that, corrected variant learns slightly better according to my experiments.

vseledkin commented 2 years ago

Sorry, i found answers in closed issues