DocRed
DocRed copied to clipboard
Question about Bert.
Dear authors, thanks for your efforts. I am planning to use your Bert implementation as a baseline for my MSc project concerning document-level RE. In the final part of the paper, you compare the performance of the sentence-encoding model and BiLSTM. Would you like to tell me if the BiLSTM refers to the baseline model in the DocRED paper?
Sorry for the late reply. Yes, the BiLSTM is the baseline model in the DocRED paper.
Thanks for your reply.
Would you mind telling you if you implemented BERT and two-phase BERT separately? I am looking at the master branch but get a bit confused? Could you point me to the correct branches of these two implementations?
Should the pre-trained model for the first phase (RE existing or not) be achieved from "rel_exist_bert_cls_sep" branch, which then can be used for the training process (RE prediction) in the second phase from the "master" branch?
Yes. "rel_exist_bert_cls_sep" branch is used for the first phase, and the master branch is used for RE prediction.
Thanks. I also notice that in your sentence encoder implementation:
context_output = self.rnn(sent, context_lens)
context_output = torch.cat([context_output, sent_emb], dim=-1)
#context_output = sent_emb
It seems that you use the concatenation of the document-level representation and sentence-level representation. As far as I'm concerned, maybe only the sent_emb should be utilized. Do I have some misunderstanding here?
Thanks
I think you are right. I did this to see if the combination of global context and sentence embedding would help. You should use sent_emb if you want to use sentence level encoding.
Got it! Thanks for your quick reply.