Views
No views yet
microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract-fulltext.| Label | Meaning |
|---|---|
| 0 | Non-medical |
| 1 | Medical |
1"Caption": {figure_caption}
2"Reference Text": {reference_text_1}
3{reference_text_2}
4...1import torch
2from transformers import AutoTokenizer, AutoModelForSequenceClassification
3
4repo_id = "Yale-BIDS-Chen/medpmc-screening-pubmedbert-caption-reference"
5
6tokenizer = AutoTokenizer.from_pretrained(repo_id)
7model = AutoModelForSequenceClassification.from_pretrained(repo_id)
8model.eval()
9
10caption = "Axial CT image showing a pulmonary nodule in the right upper lobe."
11references = [
12 "The CT findings demonstrated a solitary pulmonary nodule.",
13 "Follow-up imaging was recommended."
14]
15
16text = '"Caption": ' + caption + '\n"Reference Text": ' + "\n".join(references)
17
18inputs = tokenizer(
19 text,
20 return_tensors="pt",
21 truncation=True,
22 padding=True,
23 max_length=512,
24)
25
26with torch.no_grad():
27 outputs = model(**inputs)
28 probs = torch.softmax(outputs.logits, dim=-1)
29 pred = torch.argmax(probs, dim=-1).item()
30
31print("Prediction:", pred)
32print("Probabilities:", probs.tolist())| Model | Input | Precision | Recall | F1 |
|---|---|---|---|---|
| Keyword match | Caption + inline text; Keywords | 70.6 | 62.2 | 61.7 |
| Bioformer-16L | Caption only | 92.2 | 92.3 | 92.2 |
| Bioformer-16L | Caption + inline text | 93.0 | 92.9 | 92.9 |
| Bioformer-8L | Caption only | 92.3 | 92.3 | 92.3 |
| Bioformer-8L | Caption + inline text | 92.3 | 92.6 | 92.5 |
| BioLinkBERT-base | Caption only | 93.0 | 92.7 | 92.9 |
| BioLinkBERT-base | Caption + inline text | 92.9 | 93.0 | 92.9 |
| PubMedBERT-fulltext | Caption only | 92.7 | 93.1 | 92.9 |
| PubMedBERT-fulltext ⭐ (This model) | Caption + inline text | 93.3 | 93.1 | 93.2 |
1@article{kim2026medpmc,
2 title={MedPMC: A Systematic Framework for Scaling High-Fidelity Medical Multimodal Data for Foundation Models},
3 author={Kim, Hyunjae and Kim, Dain and Xiao, Pan and Applebaum, Serina S and Chung, Younjoon and Ai, Xuguang and Yin, Yu and Jiang, Roy and Du, Yuexi and Wei, Yawen and others},
4 journal={arXiv preprint arXiv:2607.07673},
5 year={2026}
6}hyunjae.kim@yale.edu.