biobert-ner-eval
BioBERT: a pre-trained biomedical language representation model for biomedical text mining — Lee et al. (2019) (arXiv:1901.08746, 2019)
What this evaluates
Evaluates a model's ability to identify and classify biomedical entities (diseases, drugs/chemicals, genes/proteins, species) in text using transfer learning from domain-specific pre-training. It tests whether contextualized representations improve entity boundary detection and classification on small biomedical corpora.
Datasets
- NCBI disease — total ?; splits: test (-1)
- 2010 i2b2/VA — total ?; splits: test (-1)
- BC5CDR — total ?; splits: test (-1)
- BC4CHEMD — total ?; splits: test (-1)
- BC2GM — total ?; splits: test (-1)
- JNLPBA — total ?; splits: test (-1)
- LINNAEUS — total ?; splits: test (-1)
- Species-800 — total ?; splits: test (-1)
Metrics
entity-level F1 (primary) — range: percent
- Harmonic mean of precision and recall calculated at the entity span level. P = correct entities / predicted entities, R = correct entities / gold entities, F1 = 2PR/(P+R).
Input / output format
Input: Raw biomedical text or sentences.
Output: Predicted entity spans with corresponding labels (e.g., Disease, Gene, Chemical, Species).
Scoring recipe
def compute_entity_f1(preds, gold):
pred_set = set(preds)
gold_set = set(gold)
tp = len(pred_set & gold_set)
fp = len(pred_set - gold_set)
fn = len(gold_set - pred_set)
p = tp / (tp + fp) if (tp + fp) > 0 else 0
r = tp / (tp + fn) if (tp + fn) > 0 else 0
f1 = 2 * p * r / (p + r) if (p + r) > 0 else 0
return p, r, f1
Common pitfalls
- Evaluating at token level instead of entity level as explicitly specified.
- Not averaging F1 scores across all 9 datasets for the overall comparison.
- Comparing against state-of-the-art models that use multi-task learning or different architectures, which BioBERT explicitly avoids.
Evidence (verbatim from paper)
For the evaluation metric, we used entity level precision, recall, and f1 score. First, we observe that BERT which was pre-trained on only the general domain corpus is quite effective. However, on average, performance of BERT was lower than that of state-of-the-art models by 2.28 in terms of F1 score. BioBERT achieves higher scores than BERT on all the datasets. On 6 out of 9 datasets, BioBERT even outperformed the current state-of-the-art models, and BioBERT (+ PubMed + PMC) outperformed the state-of-the-art models by 0.51 in terms of F1 score on average.
Citation
@misc{lee2019biobert,
title={BioBERT: a pre-trained biomedical language representation model for biomedical text mining},
author={Lee et al. (2019)},
year={2019},
note={arXiv:1901.08746}
}
1---2name: biobert-ner-eval3description: Evaluates a model's ability to identify and classify biomedical entities (diseases, drugs/chemicals, genes/proteins, species) in text using transfer learning from domain-specific pre-training. It tests whether contextualized representations improve entity boundary detection and classification on small biomedical corpora. Use when the user wants to benchmark on NCBI disease, 2010 i2b2/VA, BC5CDR, BC4CHEMD, BC2GM, JNLPBA, LINNAEUS, Species-800, or asks about evaluating this task. Reports entity-level F1.4---56# biobert-ner-eval78> BioBERT: a pre-trained biomedical language representation model for biomedical text mining — Lee et al. (2019) (arXiv:1901.08746, 2019)910## What this evaluates1112Evaluates a model's ability to identify and classify biomedical entities (diseases, drugs/chemicals, genes/proteins, species) in text using transfer learning from domain-specific pre-training. It tests whether contextualized representations improve entity boundary detection and classification on small biomedical corpora.1314## Datasets1516- **NCBI disease** — total ?; splits: test (-1)17- **2010 i2b2/VA** — total ?; splits: test (-1)18- **BC5CDR** — total ?; splits: test (-1)19- **BC4CHEMD** — total ?; splits: test (-1)20- **BC2GM** — total ?; splits: test (-1)21- **JNLPBA** — total ?; splits: test (-1)22- **LINNAEUS** — total ?; splits: test (-1)23- **Species-800** — total ?; splits: test (-1)2425## Metrics2627- `entity-level F1` **(primary)** — range: percent28 - Harmonic mean of precision and recall calculated at the entity span level. P = correct entities / predicted entities, R = correct entities / gold entities, F1 = 2PR/(P+R).2930## Input / output format3132**Input**: Raw biomedical text or sentences.3334**Output**: Predicted entity spans with corresponding labels (e.g., Disease, Gene, Chemical, Species).3536## Scoring recipe3738```python39def compute_entity_f1(preds, gold):40 pred_set = set(preds)41 gold_set = set(gold)42 tp = len(pred_set & gold_set)43 fp = len(pred_set - gold_set)44 fn = len(gold_set - pred_set)45 p = tp / (tp + fp) if (tp + fp) > 0 else 046 r = tp / (tp + fn) if (tp + fn) > 0 else 047 f1 = 2 * p * r / (p + r) if (p + r) > 0 else 048 return p, r, f149```5051## Common pitfalls5253- Evaluating at token level instead of entity level as explicitly specified.54- Not averaging F1 scores across all 9 datasets for the overall comparison.55- Comparing against state-of-the-art models that use multi-task learning or different architectures, which BioBERT explicitly avoids.5657## Evidence (verbatim from paper)5859> For the evaluation metric, we used entity level precision, recall, and f1 score. First, we observe that BERT which was pre-trained on only the general domain corpus is quite effective. However, on average, performance of BERT was lower than that of state-of-the-art models by 2.28 in terms of F1 score. BioBERT achieves higher scores than BERT on all the datasets. On 6 out of 9 datasets, BioBERT even outperformed the current state-of-the-art models, and BioBERT (+ PubMed + PMC) outperformed the state-of-the-art models by 0.51 in terms of F1 score on average.6061## Citation6263```bibtex64@misc{lee2019biobert,65 title={BioBERT: a pre-trained biomedical language representation model for biomedical text mining},66 author={Lee et al. (2019)},67 year={2019},68 note={arXiv:1901.08746}69}70```7172- arXiv: 1901.08746