bert icon indicating copy to clipboard operation
bert copied to clipboard

apply bert as basic encoder to intergate with classificial architecture, but achieve worse result than original finetuning

Open yyht opened this issue 8 years ago • 2 comments

I had tried to apply bert as a basic sentence encoder, and stacked on some traditional architecture such as match pyramid, question and passage interaction for downstream task such as nli, qa. But I got worse results compared to originial fintuing. And it took more time to converge than original finetuning...

yyht avatar Nov 19 '18 03:11 yyht

for using BERT as a sentence encoder, maybe you want to check https://github.com/hanxiao/bert-as-service

hanxiao avatar Nov 19 '18 04:11 hanxiao

BERT is not designed to be a "sentence encoder". If you used the hidden vector corresponding to the [CLS] token as a fixed representation that is certainly bad, because that is not a meaningful representation of the sentence.

Our recommended method of using BERT for classification is fine-tuning, as shown in run_classifier.py. If you want to use BERT for with features, we would recommend some sort of learned pooling over the word tokens, but we don't have a specific recommendation for how to do this since this was not really the focus of the paper.

jacobdevlin-google avatar Nov 24 '18 01:11 jacobdevlin-google