CarD-T: Carcinogen Detection via Transformers
Overview
CarD-T (Carcinogen Detection via Transformers) is a novel text analytics approach that combines transformer-based machine learning with probabilistic statistical analysis to efficiently nominate carcinogens from scientific texts. This model is designed to address the challenges faced by current systems in managing the burgeoning biomedical literature related to carcinogen identification and classification.
Model Details
- Architecture: Based on Bio-ELECTRA, a 335 million parameter language model
- Training Data: PubMed abstracts featuring known carcinogens from International Agency for Research on Cancer (IARC) groups G1 and G2A
- Task: Named Entity Recognition (NER) for carcinogen identification
- Performance:
- Precision: 0.894
- Recall: 0.857
- F1 Score: 0.875
Features
- Efficient nomination of potential carcinogens from scientific literature
- Context classifier to enhance accuracy and manage computational demands
- Capable of identifying both chemical and non-chemical carcinogenic factors
- Trained on a comprehensive dataset of carcinogen-related abstracts from 2000-2024
- Recognizes named entities:
- "carcinogen" (implicated)
- "negative" (exculpated)
- "antineoplastic" (cancer protective)
- "cancertype" (additional metadata such as organism, sex, organ, and virulence)
Use Cases
- Streamlining toxicogenomic literature reviews
- Identifying potential carcinogens for further investigation
- Augmenting existing carcinogen databases with emerging candidates
Limitations
- Identifies potential candidates, not confirmed carcinogens
- Analysis limited to abstract-level information
- May be influenced by publication trends and research focus shifts
Deployment and Usage
Installation
To use the CarD-T model, first install the required dependencies:
pip install transformers torch
Loading the Model
from transformers import AutoTokenizer, AutoModelForTokenClassification
model_name = "jimnoneill/CarD-T"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForTokenClassification.from_pretrained(model_name)
Using the Model for Named Entity Recognition
def predict_entities(text):
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
outputs = model(**inputs)
predictions = outputs.logits.argmax(dim=2)
entities = []
for i, pred in enumerate(predictions[0]):
if pred != 0: # 0 is typically the 'O' (Outside) label
entity_type = model.config.id2label[pred.item()]
word = tokenizer.convert_ids_to_tokens(inputs.input_ids[0][i])
entities.append((word, entity_type))
return entities
# Example usage
text = "Recent studies suggest that compound X may have antineoplastic properties in lung cancer models."
entities = predict_entities(text)
print(entities)
Full Pipeline Example
def analyze_text(text):
entities = predict_entities(text)
metadata = process_metadata(text)
results = {
"entities": entities,
"metadata": metadata
}
return results
# Example usage
text = "Recent studies in male rats suggest that compound X may have antineoplastic properties in lung cancer models, while compound Y shows carcinogenic potential in liver cells."
analysis = analyze_text(text)
print(analysis)
Citation
If you use this model in your research, please cite: O'Neill, J., Reddy, G.A., Dhillon, N., Tripathi, O., Alexandrov, L., & Katira, P. (2024). CarD-T: Interpreting Carcinomic Lexicon via Transformers. MedRxiv.
License
MIT License
Copyright (c) 2024 Jamey O'Neill
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Contact
For questions and feedback, please contact Jamey ONeill at joneilliii@sdsu.edu.
- Downloads last month
- 5