問題回答(QA)是自然語言處理(NLP)和信息檢索(IR)的領域。質量保證任務基本上是通過使用給定的數據或數據庫以自然語言為給定的問題提供精確而快速的答案。在這個項目中,我們解決了有關醫療論文的問題的問題。有很多語言模型發布,可用於問答任務。在這個項目中,我們想開發一種專門在醫學領域培訓的語言模型。我們的目標是在醫學論文上開發特定於上下文的語言模型,比一般語言模型更好。我們使用Electra-Small作為基礎模型,並使用醫療紙數據集對其進行了訓練,然後在Medical QA數據集上進行了微調。我們訓練了三種不同的模型,並將其在下游任務的NLP任務上進行了比較。
您可以在此處訪問我們的模型:
Med-Electra小型型號17GB-64K詞彙
Med-Electra小型39GB-30.5K vocab https://huggingface.co/enelpi/Med-electra-small-30k-discriminator
Med-Electra小型39GB-64K vocab https://huggingface.co/enelpi/Med-electra-small-64k-discriminator
我們使用了醫學論文S2orc。我們使用研究領域過濾了S2ORC數據庫,並進行了醫學論文。我們使用了兩個不同的數據集,包括碎片,我們為17GB數據集進行了11張碎片,並使用了26個碎片用於39GB數據集。之後,我們採用了在PubMed和PubMedCentral上出版的內容。我們僅使用了這些論文的pdf_parses,因為pdf_parses中的句子包含更多信息。
{
"section": "Introduction",
"text": "Dogs are happier cats [13, 15]. See Figure 3 for a diagram.",
"cite_spans": [
{"start": 22, "end": 25, "text": "[13", "ref_id": "BIBREF11"},
{"start": 27, "end": 30, "text": "15]", "ref_id": "BIBREF30"},
...
],
"ref_spans": [
{"start": 36, "end": 44, "text": "Figure 3", "ref_id": "FIGREF2"},
]
}
{
...,
"BIBREF11": {
"title": "Do dogs dream of electric humans?",
"authors": [
{"first": "Lucy", "middle": ["Lu"], "last": "Wang", "suffix": ""},
{"first": "Mark", "middle": [], "last": "Neumann", "suffix": "V"}
],
"year": "",
"venue": "barXiv",
"link": null
},
...
}
{
"TABREF4": {
"text": "Table 5. Clearly, we achieve SOTA here or something.",
"type": "table"
}
...,
"FIGREF2": {
"text": "Figure 3. This is the caption of a pretty figure.",
"type": "figure"
},
...
}
}
17GB的語料庫數據摘要
| 句子 | 獨特的單詞 | 尺寸 | 令牌大小 | |
|---|---|---|---|---|
| 火車 | 111537350 | 27609654 | 16.9GB | 2538210492 |
39GB的語料庫數據摘要
| 句子 | 獨特的單詞 | 尺寸 | 令牌大小 | |
|---|---|---|---|---|
| 火車 | 263134203 | 52206886 | 39.9GB | 6000436472 |
使用生成的語料庫,我們從頭開始預先培訓的Electra-Mall模型。該模型在RTX 2080 Ti GPU上進行了訓練。
| 模型 | 層 | 隱藏尺寸 | 參數 |
|---|---|---|---|
| Electra-small | 12 | 256 | 14m |
對於17GB
線數:111332331
單詞數(令牌):2538210492
該型號花了6天12小時才能訓練
| 公制 | 價值 |
|---|---|
| DISC_ACCURACY | 0.9456 |
| DISC_AUC | 0.9256 |
| DISC_LOSS | 0.154 |
| disc_precision | 0.7832 |
| disc_recall | 0.4545 |
| 損失 | 10.45 |
| masked_lm_accuracy | 0.5168 |
| masked_lm_loss | 2.776 |
| Sampled_masked_lm_accuracy | 0.4135 |
對於39GB,詞彙尺寸為30.5k
線數:263134203
單詞數(令牌):6000436472
該型號花了5天9小時才能訓練
| 公制 | 價值 |
|---|---|
| DISC_ACCURACY | 0.943 |
| DISC_AUC | 0.9184 |
| DISC_LOSS | 0.1609 |
| disc_precision | 0.7718 |
| disc_recall | 0.4153 |
| 損失 | 10.72 |
| masked_lm_accuracy | 0.5218 |
| masked_lm_loss | 2.7 |
| Sampled_masked_lm_accuracy | 0.4177 |
對於39GB,詞彙尺寸為64k
線數:263134203
單詞數(令牌):6000436472
該型號花了6天12小時才能訓練
| 公制 | 價值 |
|---|---|
| DISC_ACCURACY | 0.9453 |
| DISC_AUC | 0.9278 |
| DISC_LOSS | 0.1534 |
| disc_precision | 0.7788 |
| disc_recall | 0.4655 |
| 損失 | 10.48 |
| masked_lm_accuracy | 0.5095 |
| masked_lm_loss | 2.82 |
| Sampled_masked_lm_accuracy | 0.4066 |
為了
| 模型/超參數 | train_steps | vocab_size | batch_size |
|---|---|---|---|
| Electra-small | 1m | 64000 | 128 |
可以在此處訪問培訓結果:
https://tensorboard.dev/experiment/g9pkbfzaqeacr7dgw2uljq/#scalars https://tensorboard.dev/experiment/qu1bq0mirgocgqbzbzhqs2ta/#scalars

為了
| 模型/超參數 | train_steps | vocab_size | batch_size |
|---|---|---|---|
| Electra-small | 1m | 30522 | 128 |
可以在此處訪問培訓結果:
https://tensorboard.dev/experiment/npyu6mkhrmgoyd8kdsqw5w/#scalars https://tensorboard.dev/experiment/zqbeq7zjsdyijs5jb8ov3g/#scalars

為了
| 模型/超參數 | train_steps | vocab_size | batch_size |
|---|---|---|---|
| Electra-small | 1m | 64000 | 128 |
可以在此處訪問培訓結果:
https://tensorboard.dev/experiment/gc51rmhdtgmj7eq0uyuavw/#scalars https://tensorboard.dev/experiment/q66kfo3lqtwk1kykgjcyyg/#scalars

對於命名的實體識別,我們使用了NCBI-Disese Copus,這是PubMed發表的疾病名稱識別的資源。
| 模型 | F1 | 損失 | 準確性 | 精確 | 記起 |
|---|---|---|---|---|---|
| ENELPI/MED-ELECTRA-SMALL-DISCINETOR | 0.8462 | 0.0545 | 0.9827 | 0.8052 | 0.8462 |
| Google/Electra-Small-Disciminator | 0.8294 | 0.0640 | 0.9806 | 0.7998 | 0.8614 |
| Google/electra-base-cissiminator | 0.8580 | 0.0675 | 0.9835 | 0.8446 | 0.8718 |
| 大型基於基礎 | 0.8348 | 0.0832 | 0.9815 | 0.8126 | 0.8583 |
| Distilroberta-bas | 0.8416 | 0.0828 | 0.9808 | 0.8207 | 0.8635 |
| 模型 | F1 | 損失 | 準確性 | 精確 | 記起 |
|---|---|---|---|---|---|
| ENELPI/MED-ELECTRA-SMALL-DISCINETOR | 0.8425 | 0.0545 | 0.9824 | 0.8028 | 0.8864 |
| Google/Electra-Small-Disciminator | 0.8280 | 0.0642 | 0.9807 | 0.7961 | 0.8625 |
| Google/electra-base-cissiminator | 0.8648 | 0.0682 | 0.9838 | 0.8442 | 0.8864 |
| 大型基於基礎 | 0.8373 | 0.0806 | 0.9814 | 0.8153 | 0.8604 |
| Distilroberta-bas | 0.8329 | 0.0811 | 0.9801 | 0.8100 | 0.8572 |
| 模型 | F1 | 損失 | 準確性 | 精確 | 記起 |
|---|---|---|---|---|---|
| ENELPI/MED-ELECTRA-SMALL-DISCINETOR | 0.8463 | 0.0559 | 0.9823 | 0.8071 | 0.8895 |
| Google/Electra-Small-Disciminator | 0.8280 | 0.0691 | 0.9806 | 0.8025 | 0.8552 |
| Google/electra-base-cissiminator | 0.8542 | 0.0645 | 0.9840 | 0.8307 | 0.8791 |
| 大型基於基礎 | 0.8424 | 0.0799 | 0.9822 | 0.8251 | 0.8604 |
| Distilroberta-bas | 0.8339 | 0.0924 | 0.9806 | 0.8136 | 0.8552 |
對於回答任務,我們使用了BioASQ問題數據集。
| 模型 | sacc | lacc |
|---|---|---|
| Enelpi/Med-Electra-Small-Disciminator-128 | 0.2821 | 0.4359 |
| Google/Electra-Small-Disciminator-128 | 0.3077 | 0.5128 |
| Enelpi/Med-Electra-Small-Disciminator-512 | 0.1538 | 0.3590 |
| Google/Electra-Small-Discisiminator-512 | 0.2564 | 0.5128 |
您可以從YouTube訪問演示視頻。 https://www.youtube.com/watch?v=fao9clyfldc&list=plhnxo6hzwbglge_iywgyxnmpz-3pgpggt&index=2
https://github.com/google-research/electra https://chriskhanhanhtran.github.io/_posts/2020-06-11-Electra-spanish/s-panish/https:/ https://github.com/github.com/github.com/allenai/allenai/allenai/sallenai/s2orc https :/ https://github.com/abachaa/medquad https://www.ncbi.nlm.nih.gov/pmc/articles/pmc5530755/pmc5530755/ https://github.com/lasseregin/medical-question-swer-data https://huggingface.co/blog/how-the-train-train https://arxiv.org/abs/1909.09.06146 https:/