Create README.md
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081---license: mitlanguage:- enbase_model:- microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract-fulltexttags:- biomedical- relation-extraction- text-classification---
# cell-cell-BERT
**Configuration: R-CLS-CPT**
## Model Description
This is a specific configuration of the cell-cell-BERT model for extracting cell-cell interactions from biomedical text. It determines whether a sentence describes a direct biological relationship between two target cell types.
For full details, see our paper: **"Defining and Evaluating Cell–Cell Relation Extraction from Biomedical Literature under Realistic Annotation Constraints"** (bioRxiv, 2025).
* **Repository:** [https://github.com/mizuno-group/cell-cell-bert](https://github.com/mizuno-group/cell-cell-bert)* **Paper:** [https://doi.org/10.64898/2025.12.01.691726](https://doi.org/10.64898/2025.12.01.691726)
## Model ConfigurationThis model corresponds to the following experimental setting in the paper:
* **Entity Indication:** [Replacement (e.g., `[CELL0]`) / Boundary Marking (e.g., `<E0>...`)]* **Architecture:** [Entity-aware (R-BERT style) / CLS-only]* **Pre-training:** [Continued Pre-training (CPT) / Base (Fine-tuning only)]
*Note: Please ensure your input data preprocessing matches the **Entity Indication** method specified above.*
## How to Get Started
**Preprocessing Requirement:**Depending on the configuration above, you must insert specific special tokens into your input text before feeding it to the model.
* **For Replacement models:** Replace cell names with `[CELL0]` and `[CELL1]`.* **For Boundary models:** Wrap cell names with `<E0>...</E0>` and `<E1>...</E1>`.
```pythonfrom transformers import AutoTokenizer, AutoModelForSequenceClassificationimport torch
# 1. Load the modelmodel_name = "mizuno-group/ccbert-[INSERT-CONFIG-NAME]"tokenizer = AutoTokenizer.from_pretrained(model_name)model = AutoModelForSequenceClassification.from_pretrained(model_name)
# 2. Prepare Input# CHANGE THIS LINE based on the Entity Indication method of this model:# text = "The [CELL0] activate [CELL1]." # If Replacementtext = "The <E0> Macrophages </E0> activate <E1> T cells </E1>." # If Boundary Marking
# 3. Inferenceinputs = tokenizer(text, return_tensors="pt")
with torch.no_grad(): logits = model(**inputs).logits predicted_class_id = logits.argmax().item()
# 0 = No Relation, 1 = Relation Existsprint(f"Predicted Class: {predicted_class_id}")
```
## Citation
```bibtex@article{Yoshikawa2025CCBERT, title = {Defining and Evaluating Cell–Cell Relation Extraction from Biomedical Literature under Realistic Annotation Constraints}, author = {Yoshikawa Mei and Mizuno Tadahaya and Ohto Yohei and Fujimoto Hiromi and Kusuhara Hiroyuki}, journal = {bioRxiv}, year = {2025}, doi = {10.64898/2025.12.01.691726}, url = {[https://doi.org/10.64898/2025.12.01.691726](https://doi.org/10.64898/2025.12.01.691726)}}
```README.mdAdded+81