Michihiro Yasunaga, Jure Leskovec, Percy Liang
Language model (LM) pretraining can learn various knowledge from text corpora, helping downstream tasks. However, existing methods such as BERT model a single document, and do not capture dependencies or knowledge that span across documents. In this work, we propose LinkBERT, an LM pretraining method that leverages links between documents, e.g., hyperlinks. Given a text corpus, we view it as a graph of documents and create LM inputs by placing linked documents in the same context. We then pretrain the LM with two joint self-supervised objectives: masked language modeling and our new proposal, document relation prediction. We show that LinkBERT outperforms BERT on various downstream tasks across two domains: the general domain (pretrained on Wikipedia with hyperlinks) and biomedical domain (pretrained on PubMed with citation links). LinkBERT is especially effective for multi-hop reasoning and few-shot QA (+5% absolute improvement on HotpotQA and TriviaQA), and our biomedical LinkBERT sets new states of the art on various BioNLP tasks (+7% on BioASQ and USMLE). We release our pretrained models, LinkBERT and BioLinkBERT, as well as code and data at https://github.com/michiyasunaga/LinkBERT.
| Task | Dataset | Metric | Value | Model |
|---|---|---|---|---|
| Relation Extraction | GAD | F1 | 84.9 | BioLinkBERT (large) |
| Relation Extraction | GAD | Micro F1 | 84.9 | BioLinkBERT (large) |
| Relation Extraction | DDI | F1 | 83.35 | BioLinkBERT (large) |
| Relation Extraction | DDI | Micro F1 | 83.35 | BioLinkBERT (large) |
| Relation Extraction | ChemProt | F1 | 79.98 | BioLinkBERT (large) |
| Relation Extraction | ChemProt | Micro F1 | 79.98 | BioLinkBERT (large) |
| Question Answering | MRQA | Average F1 | 81 | LinkBERT (large) |
| Question Answering | BLURB | Accuracy | 83.5 | BioLinkBERT (large) |
| Question Answering | BLURB | Accuracy | 80.81 | BioLinkBERT (base) |
| Question Answering | PubMedQA | Accuracy | 72.2 | BioLinkBERT (large) |
| Question Answering | PubMedQA | Accuracy | 70.2 | BioLinkBERT (base) |
| Question Answering | MedQA | Accuracy | 40 | BioLinkBERT (base) |
| Question Answering | BioASQ | Accuracy | 94.8 | BioLinkBERT (large) |
| Question Answering | BioASQ | Accuracy | 91.4 | BioLinkBERT (base) |
| Question Answering | NewsQA | F1 | 72.6 | LinkBERT (large) |
| Question Answering | SQuAD1.1 | EM | 87.45 | LinkBERT (large) |
| Question Answering | SQuAD1.1 | F1 | 92.7 | LinkBERT (large) |
| Question Answering | TriviaQA | F1 | 78.2 | LinkBERT (large) |
| Language Modelling | BIOSSES | Pearson Correlation | 0.9363 | BioLinkBERT (large) |
| Language Modelling | BIOSSES | Pearson Correlation | 0.9325 | BioLinkBERT (base) |
| Medical Relation Extraction | DDI extraction 2013 corpus | F1 | 83.35 | BioLinkBERT (large) |
| Named Entity Recognition (NER) | NCBI-disease | F1 | 88.76 | BioLinkBERT (large) |
| Named Entity Recognition (NER) | BC5CDR-chemical | F1 | 94.04 | BioLinkBERT (large) |
| Named Entity Recognition (NER) | BC5CDR-disease | F1 | 86.39 | BioLinkBERT (large) |
| Named Entity Recognition (NER) | BC2GM | F1 | 85.18 | BioLinkBERT (large) |
| Named Entity Recognition (NER) | BC5CDR | F1 | 90.22 | BioLinkBERT (large) |
| Named Entity Recognition (NER) | JNLPBA | F1 | 80.06 | BioLinkBERT (large) |
| Text Classification | BLURB | F1 | 84.88 | BioLinkBERT (large) |
| Text Classification | BLURB | F1 | 84.35 | BioLinkBERT (base) |
| Text Classification | HOC | F1 | 88.1 | BioLinkBERT (large) |
| Text Classification | HOC | Micro F1 | 84.87 | BioLinkBERT (large) |
| Sentence Pair Modeling | BIOSSES | Pearson Correlation | 0.9363 | BioLinkBERT (large) |
| Sentence Pair Modeling | BIOSSES | Pearson Correlation | 0.9325 | BioLinkBERT (base) |
| Document Classification | HOC | F1 | 88.1 | BioLinkBERT (large) |
| Document Classification | HOC | Micro F1 | 84.87 | BioLinkBERT (large) |
| Biomedical Information Retrieval | EBM PICO | Macro F1 word level | 74.19 | BioLinkBERT (large) |
| Biomedical Information Retrieval | EBM PICO | Macro F1 word level | 73.97 | BioLinkBERT (base) |
| Classification | BLURB | F1 | 84.88 | BioLinkBERT (large) |
| Classification | BLURB | F1 | 84.35 | BioLinkBERT (base) |
| Classification | HOC | F1 | 88.1 | BioLinkBERT (large) |
| Classification | HOC | Micro F1 | 84.87 | BioLinkBERT (large) |
| Semantic Similarity | BIOSSES | Pearson Correlation | 0.9363 | BioLinkBERT (large) |
| Semantic Similarity | BIOSSES | Pearson Correlation | 0.9325 | BioLinkBERT (base) |