neubig/nn4nlp-code

MST decoder in biaffine parser

Closed this issue · 0 comments

I find the comments in the MST decoder confusing. The MST decoder is not running a full Chu-Liu-Edmonds MST. It is based on the heuristics that Stanford CoNLL 2017 parser used. Moreover, the scores in Stanford's code are assumed to be normalized by softmax (therefore multiplicative scoring) whereas here, the code passes unnormalized scores , which are basically log-probabilities (ignoring the denominator of softmax, which of course is okay because it affects uniformly whichever node you pick as the parent). I think all division operations in MST decoder should be replaced by subtraction, and 0s should be replaced by -inf.