lavis-nlp / spert

PyTorch code for SpERT: Span-based Entity and Relation Transformer
MIT License
692 stars 148 forks source link

Why use sigmoid instead of softmax in relation classification? #10

Closed Maybewuss closed 4 years ago

Maybewuss commented 4 years ago

Does a pair of candidates have more than one relations?

markus-eberts commented 4 years ago

Our intention was indeed to be able to handle such cases with our model (e.g. "John Doe lives and works in New York City" with (John Doe, Lives_In, New York City) and (John Doe, Works_In, New York City)). However, in the datasets we evaluated in our paper a pair of entities is annotated with a single relation at most. So in this case you can probably achieve similar results by using a softmax function. But at the end our goal is to create a model that is universally applicable and not specifically designed for the available academic data.

markus-eberts commented 4 years ago

Please leave a comment if this issue is still unsolved.