Update README.md
Browse files123---license: mit---1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283---license: mitlanguage:- enbase_model:- microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract-fulltexttags:- biomedical- relation-extraction- text-classification---# cell-cell-BERT**Configuration: R-pretrained**This model includes learned embeddings for special tokens (e.g., [CELL0], [CELL1]), acquired through continued pre-training on biomedical text.## Model DescriptionThis 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).logitspredicted_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.md+83-3