DevWithKaiju commited on
Commit
161242b
·
verified ·
1 Parent(s): aba8b16

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +81 -0
README.md ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ base_model:
6
+ - microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract-fulltext
7
+ tags:
8
+ - biomedical
9
+ - relation-extraction
10
+ - text-classification
11
+ ---
12
+
13
+ # cell-cell-BERT
14
+
15
+ **Configuration: R-CLS-base**
16
+
17
+ ## Model Description
18
+
19
+ 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.
20
+
21
+ For full details, see our paper: **"Defining and Evaluating Cell–Cell Relation Extraction from Biomedical Literature under Realistic Annotation Constraints"** (bioRxiv, 2025).
22
+
23
+ * **Repository:** [https://github.com/mizuno-group/cell-cell-bert](https://github.com/mizuno-group/cell-cell-bert)
24
+ * **Paper:** [https://doi.org/10.64898/2025.12.01.691726](https://doi.org/10.64898/2025.12.01.691726)
25
+
26
+ ## Model Configuration
27
+ This model corresponds to the following experimental setting in the paper:
28
+
29
+ * **Entity Indication:** [Replacement (e.g., `[CELL0]`) / Boundary Marking (e.g., `<E0>...`)]
30
+ * **Architecture:** [Entity-aware (R-BERT style) / CLS-only]
31
+ * **Pre-training:** [Continued Pre-training (CPT) / Base (Fine-tuning only)]
32
+
33
+ *Note: Please ensure your input data preprocessing matches the **Entity Indication** method specified above.*
34
+
35
+ ## How to Get Started
36
+
37
+ **Preprocessing Requirement:**
38
+ Depending on the configuration above, you must insert specific special tokens into your input text before feeding it to the model.
39
+
40
+ * **For Replacement models:** Replace cell names with `[CELL0]` and `[CELL1]`.
41
+ * **For Boundary models:** Wrap cell names with `<E0>...</E0>` and `<E1>...</E1>`.
42
+
43
+ ```python
44
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
45
+ import torch
46
+
47
+ # 1. Load the model
48
+ model_name = "mizuno-group/ccbert-[INSERT-CONFIG-NAME]"
49
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
50
+ model = AutoModelForSequenceClassification.from_pretrained(model_name)
51
+
52
+ # 2. Prepare Input
53
+ # CHANGE THIS LINE based on the Entity Indication method of this model:
54
+ # text = "The [CELL0] activate [CELL1]." # If Replacement
55
+ text = "The <E0> Macrophages </E0> activate <E1> T cells </E1>." # If Boundary Marking
56
+
57
+ # 3. Inference
58
+ inputs = tokenizer(text, return_tensors="pt")
59
+
60
+ with torch.no_grad():
61
+ logits = model(**inputs).logits
62
+ predicted_class_id = logits.argmax().item()
63
+
64
+ # 0 = No Relation, 1 = Relation Exists
65
+ print(f"Predicted Class: {predicted_class_id}")
66
+
67
+ ```
68
+
69
+ ## Citation
70
+
71
+ ```bibtex
72
+ @article{Yoshikawa2025CCBERT,
73
+ title = {Defining and Evaluating Cell–Cell Relation Extraction from Biomedical Literature under Realistic Annotation Constraints},
74
+ author = {Yoshikawa Mei and Mizuno Tadahaya and Ohto Yohei and Fujimoto Hiromi and Kusuhara Hiroyuki},
75
+ journal = {bioRxiv},
76
+ year = {2025},
77
+ doi = {10.64898/2025.12.01.691726},
78
+ url = {[https://doi.org/10.64898/2025.12.01.691726](https://doi.org/10.64898/2025.12.01.691726)}
79
+ }
80
+
81
+ ```