英文:
What loss function does Space use for Named Entity Recognition (NER)
问题
我对了解 Space 库在命名实体识别(NER)训练模型中使用的具体损失函数感兴趣。Space 是否为NER任务推荐标准损失函数?是否推荐针对特定NER情景的替代损失函数?我还想知道这个损失函数是否可定制,以及在 Space 库中是如何实现的。
非常感谢您提供如此详细的回答。我真的很感激您的帮助!
英文:
I'm interested in understanding the specific loss function used by the Space library for training models in the context of Named Entity Recognition. Is there a standard loss function recommended by Space for NER tasks? Are there any alternative loss functions recommended for specific NER scenarios? I would also like to know if the loss function is customizable and how it is implemented within the Space library.
.
.
.
.
Thank you for providing such a detailed response. I really appreciate your help!
答案1
得分: 0
答案比你预期的要复杂一些,因为spaCy使用了基于转移的NER模型,并带有模拟学习目标。算法的最佳描述在这个视频中,尤其是结构化预测部分:https://www.youtube.com/watch?v=sqDHBH9IjRU
用于在不同动作之间做出决策的实际损失函数也有些棘手。实现在这里:https://github.com/explosion/spaCy/blob/0367f864fe90dfa1dcdd0bfaf8f06dbcd5e97e45/spacy/syntax/_parser_model.pyx#L153
我相信我在其他评论中也描述过这个,但我不能立即找到它。基本上可能会有几种同样好的转移方式,我们希望目标函数能考虑到这一点。关于此的方程式在这里第4节有描述:https://aclanthology.org/P05-1022.pdf
英文:
The answer to this is more complicated than you might expect, because spaCy uses a transition-based NER model with an imitation learning objective. The best description of the algorithm is this video, especially the structured prediction part: https://www.youtube.com/watch?v=sqDHBH9IjRU
The actual loss function used to decide between the different actions is also a bit tricky. The implementation is here: https://github.com/explosion/spaCy/blob/0367f864fe90dfa1dcdd0bfaf8f06dbcd5e97e45/spacy/syntax/_parser_model.pyx#L153
I'm sure I've described this in other comments but I can't immediately find it. Basically there may be several equally good transitions, and we want the objective function to account for that. The equations for this are described in Section 4 here: https://aclanthology.org/P05-1022.pdf
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论