-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
About 'X' label #1
Comments
Label 'X' is not considered for f1 metrics Line 515 in dba5e7d
Label 'X' is not equal to Label 'O' |
But did you use in train? |
For training I used "X". |
I think add more label in the conll2003 NER standard dataset make it not very comparable for previous works. Could you remove 'X' label during training and get a similar result? |
If you remove "X" while training or replace "X" with "O" , model performance will drop to ~89 f1 score |
So this is my opinion, use ‘X’ label make it high F1-score, it's not fair. I get the similar result about 91.3 F1 score. And I think BERT origin paper is also remove 'X' label because they use document information to get high F1-score. In short, 'X' label don't have any signal. |
91.3 without using "X" ?? |
Yes. I get the word piece output from BERT model, and then map the first token's vector so I get the same numbers vectors as the standard dataset. And then use a softmax matrix to get the final result. But I only use the BERTModel in pytorch_pretrained_bert. |
For example |
Yes. Because I think the fine tune bert could learn this pattern. |
I will try this way and let you know |
@kugwzk |
I just record the origin word position use a dict in python. For example: [Jim Hen ##son was a puppet ##eer] for [0,1,3,4,5], so I padding the origin word sequence again in the classifier layer. It may be slowly :). |
i think we can add mask to X label when training |
@ereday |
Hi @kamalkraj , I am Nic from NVIDIA, thanks for your contribution on this project! |
@toxic2m |
Hi @kamalkraj , Actually, I already done this part locally, and I suggest you to map [CLS] and [SEP] to O directly. |
Is there anyone able to reproduce BERT_NER paper's results (92.4F1 for BERT Base) ? |
@sbmaruf The result of Conll03 NER reported in the BERT origin paper used document context, which is different from the standard sentence-based evaluation. You can see something about that in here: allenai/allennlp#2067 (comment) |
@kugwzk thanks for your reply. but how to add document level context with NER? |
In my opinion, you should remove the 'X' label's signal in evaluation, because you add more label than standard dataset, so I can't know very well the F1-score increase because the more label of 'X'. I think the 'X' label is not equal the 'O' label in standard dataset and the BERT paper, but in your code it may be same.
The text was updated successfully, but these errors were encountered: