lavis-nlp/spert

Selecting Span Problem

Jim0530 opened this issue · 2 comments

I've seen ur paper.For one thing I don't really understand is how do u or what is ur algorithm select spans from a sentence and using as ur input to the span classifier?
And for relation classifier is it possible to convert into open relation extraction which relation r not pre-defined and exist int the sentence?

My understanding from the code is that during training the system uses gold label spans and generates all negative spans, then does some downsampling for the negative spans (a hyperparameter). During inference/evaluation, however, it generates all possible spans and selects the best spans based on how the model prioritizing them i.e. what has it learned through the training. The authors might confirm this.
For the second question, that is exactly what this system does. You don't need pre-annotated entities or relation labels for inference. This is a 'relation extraction' task.

Thanks for answering this issue @avipartho. You are right, during inference we classify all spans up to length 10 (this is a hyperparameter - you can adjust it in the config file). Any span assigned to the 'None' class is then filtered.