Fine-tuned model from the PsyNamic project (code, webapp): Substance Naivety.
This is the model deployed in the PsyNamic webapp after the revision (Nov 2026). It supersedes STRIDE-lab/biomedbert-abstract-substance-naivety-20250221 (tag submission-v1, initial submission). All current models: PsyNamic collection.
michiyasunaga/BioLinkBERT-base
Substance Naivety (multi-label: several labels per abstract possible)
Specifies whether participants were psychedelic-naive or experienced users.
| ID | Label | Definition |
|---|---|---|
| 0 | Substance-Naïve Participants | Study participants have not used psychedelic substances in the past. |
| 1 | Substance-non-naïve participants | Study participants did use psychedelic substances in the past. |
| 2 | Unknown | It is not clear whether the study participants have consumed such substances (e.g., a survey on drug use). However, if healthy controls are part of the study cohort for which we do not know whether they have consumed psychedelics, don't select this option. |
| 3 | Not applicable | E.g., for systematic reviews. |
Multi-label: a sigmoid is applied per label, and every label with probability ≥ 0.18 is predicted. This is the threshold used in the PsyNamic webapp. It was tuned on the validation set with a pre-specified rule: start at the threshold with maximal weighted F1, then lower it as long as weighted precision stays within 0.05 of its value there.
Five base models (BiomedBERT-abstract, BioBERT, BioLinkBERT, ClinicalBERT, SciBERT) were fine-tuned with identical hyperparameters. The checkpoint is the one with the lowest validation loss (early stopping), and the base model was selected on the validation set (weighted F1). The test set was used once, after selection.
Held-out test set (97 abstracts), tuned threshold as in the webapp, 95% bootstrap CIs (1,000 BCa resamples).
| Metric (test) | Value [95% CI] |
|---|---|
| Weighted F1 | 0.859 [0.788–0.912] |
| Weighted precision | 0.834 [0.747–0.891] |
| Weighted recall | 0.890 [0.819–0.944] |
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
repo = "STRIDE-lab/biolinkbert-substance-naivety-20261107"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForSequenceClassification.from_pretrained(repo)
inputs = tokenizer("<title>. <abstract>", truncation=True, max_length=512, return_tensors="pt")
logits = model(**inputs).logits
probs = torch.sigmoid(logits)[0]
pred = [model.config.id2label[i] for i, p in enumerate(probs) if p >= 0.18]
{
"data": "<private_dataset>",
"task": "Substance Naivety",
"model": "biolinkbert",
"cross_val": false,
"batch_size": 8,
"learning_rate": 5e-05,
"weight_decay": 0.01,
"lr_scheduler": "linear",
"warmup_ratio": 0.1,
"epochs": 30,
"dropout": 0.1,
"early_stopping_patience": 5,
"gradient_clipping": 1.0,
"max_length": 512,
"threshold": 0.5,
"is_multilabel": true
}
threshold (0.5) is only the cut-off used to compute the validation metrics during training. It does not affect the model weights or the checkpoint choice (lowest validation loss). Predictions in the webapp and the test performance above use the tuned threshold 0.18 (see Prediction rule).
michiyasunaga/BioLinkBERT-base