The MultiMolecule team is aware of a potential risk in reproducing the results of AIDO.RNA.
The original implementation of AIDO.RNA uses a special tokenizer that identifies
U
and
T
as different tokens.
This behaviour is not supported by MultiMolecule.
The MultiMolecule team has confirmed that the provided model and checkpoints are producing the same intermediate representations as the original implementation.
The team releasing AIDO.RNA did not write this model card for this model so this model card has been written by the MultiMolecule team.
Model Details
AIDO.RNA is a
bert
-style model pre-trained on a large corpus of non-coding RNA sequences in a self-supervised fashion. This means that the model was trained on the raw nucleotides of RNA sequences only, with an automatic process to generate inputs and labels from those texts. Please refer to the
Training Details
section for more information on the training process.
The model file depends on the
multimolecule
library. You can install it using pip:
pip install multimolecule
Direct Use
You can use this model directly with a pipeline for masked language modeling:
>>> import multimolecule # you must import multimolecule to register models>>> from transformers import pipeline
>>> unmasker = pipeline("fill-mask", model="multimolecule/aido.rna-650m")
>>> unmasker("gguc<mask>cucugguuagaccagaucugagccu")
[{'score': 0.3169708847999573,
'token': 9,
'token_str': 'U',
'sequence': 'G G U C U C U C U G G U U A G A C C A G A U C U G A G C C U'},
{'score': 0.12581486999988556,
'token': 14,
'token_str': 'W',
'sequence': 'G G U C W C U C U G G U U A G A C C A G A U C U G A G C C U'},
{'score': 0.09805052727460861,
'token': 15,
'token_str': 'K',
'sequence': 'G G U C K C U C U G G U U A G A C C A G A U C U G A G C C U'},
{'score': 0.07830371707677841,
'token': 18,
'token_str': 'D',
'sequence': 'G G U C D C U C U G G U U A G A C C A G A U C U G A G C C U'},
{'score': 0.05044170096516609,
'token': 12,
'token_str': 'Y',
'sequence': 'G G U C Y C U C U G G U U A G A C C A G A U C U G A G C C U'}]
Downstream Use
Extract Features
Here is how to use this model to get the features of a given sequence in PyTorch:
from multimolecule import RnaTokenizer, AidoRnaModel
tokenizer = RnaTokenizer.from_pretrained("multimolecule/aido.rna-650m")
model = AidoRnaModel.from_pretrained("multimolecule/aido.rna-650m")
text = "UAGCUUAUCAGACUGAUGUUG"input = tokenizer(text, return_tensors="pt")
output = model(**input)
Sequence Classification / Regression
This model is not fine-tuned for any specific task. You will need to fine-tune the model on a downstream task to use it for sequence classification or regression.
Here is how to use this model as backbone to fine-tune for a sequence-level task in PyTorch:
import torch
from multimolecule import RnaTokenizer, AidoRnaForSequencePrediction
tokenizer = RnaTokenizer.from_pretrained("multimolecule/aido.rna-650m")
model = AidoRnaForSequencePrediction.from_pretrained("multimolecule/aido.rna-650m")
text = "UAGCUUAUCAGACUGAUGUUG"input = tokenizer(text, return_tensors="pt")
label = torch.tensor([1])
output = model(**input, labels=label)
Token Classification / Regression
This model is not fine-tuned for any specific task. You will need to fine-tune the model on a downstream task to use it for token classification or regression.
Here is how to use this model as backbone to fine-tune for a nucleotide-level task in PyTorch:
import torch
from multimolecule import RnaTokenizer, AidoRnaForTokenPrediction
tokenizer = RnaTokenizer.from_pretrained("multimolecule/aido.rna-650m")
model = AidoRnaForTokenPrediction.from_pretrained("multimolecule/aido.rna-650m")
text = "UAGCUUAUCAGACUGAUGUUG"input = tokenizer(text, return_tensors="pt")
label = torch.randint(2, (len(text), ))
output = model(**input, labels=label)
Contact Classification / Regression
This model is not fine-tuned for any specific task. You will need to fine-tune the model on a downstream task to use it for contact classification or regression.
Here is how to use this model as backbone to fine-tune for a contact-level task in PyTorch:
import torch
from multimolecule import RnaTokenizer, AidoRnaForContactPrediction
tokenizer = RnaTokenizer.from_pretrained("multimolecule/aido.rna-650m")
model = AidoRnaForContactPrediction.from_pretrained("multimolecule/aido.rna-650m")
text = "UAGCUUAUCAGACUGAUGUUG"input = tokenizer(text, return_tensors="pt")
label = torch.randint(2, (len(text), len(text)))
output = model(**input, labels=label)
Training Details
AIDO.RNA used Masked Language Modeling (MLM) as the pre-training objective: taking a sequence, the model randomly masks 15% of the tokens in the input then runs the entire masked sentence through the model and has to predict the masked tokens. This is comparable to the Cloze task in language modeling.
Training Data
The AIDO.RNA model was pre-trained on
RNAcentral
and
MARS
.
RNAcentral is a free, public resource that offers integrated access to a comprehensive and up-to-date set of non-coding RNA sequences provided by a collaborating group of
Expert Databases
representing a broad range of organisms and RNA types.
AIDO.RNA applied SeqKit to remove duplicated sequences in the RNAcentral, resulting 42 million unique sequences.
Note that AIDO.RNA identifies
U
and
T
as different tokens, which is not supported by MultiMolecule. During model conversion, the embeddings of
T
is discarded. This means that the model will not be able to distinguish between
U
and
T
in the input sequences.
Training Procedure
Preprocessing
AIDO.RNA used masked language modeling (MLM) as the pre-training objective. The masking procedure is similar to the one used in BERT:
15% of the tokens are masked.
In 80% of the cases, the masked tokens are replaced by
<mask>
.
In 10% of the cases, the masked tokens are replaced by a random token (different) from the one they replace.
In the 10% remaining cases, the masked tokens are left as is.
Pre-training
Epochs: 6
Optimizer: AdamW
Learning rate: 5e-5
Learning rate warm-up: 2,000 steps
Learning rate scheduler: Cosine
Minimum learning rate: 1e-5
Weight decay: 0.01
Citation
BibTeX
:
@article {Zou2024.11.28.625345,
author = {Zou, Shuxian and Tao, Tianhua and Mahbub, Sazan and Ellington, Caleb N. and Algayres, Robin and Li, Dian and Zhuang, Yonghao and Wang, Hongyi and Song, Le and Xing, Eric P.},
title = {A Large-Scale Foundation Model for RNA Function and Structure Prediction},
elocation-id = {2024.11.28.625345},
year = {2024},
doi = {10.1101/2024.11.28.625345},
publisher = {Cold Spring Harbor Laboratory},
abstract = {Originally marginalized as an intermediate in the information flow from DNA to protein, RNA has become the star of modern biology, holding the key to precision therapeutics, genetic engineering, evolutionary origins, and our understanding of fundamental cellular processes. Yet RNA is as mysterious as it is prolific, serving as an information store, a messenger, and a catalyst, spanning many underchar-acterized functional and structural classes. Deciphering the language of RNA is important not only for a mechanistic understanding of its biological functions but also for accelerating drug design. Toward this goal, we introduce AIDO.RNA, a pre-trained module for RNA in an AI-driven Digital Organism [1]. AIDO.RNA contains a scale of 1.6 billion parameters, trained on 42 million non-coding RNA (ncRNA) sequences at single-nucleotide resolution, and it achieves state-of-the-art performance on a comprehensive set of tasks, including structure prediction, genetic regulation, molecular function across species, and RNA sequence design. AIDO.RNA after domain adaptation learns to model essential parts of protein translation that protein language models, which have received widespread attention in recent years, do not. More broadly, AIDO.RNA hints at the generality of biological sequence modeling and the ability to leverage the central dogma to improve many biomolecular representations. Models and code are available through ModelGenerator in https://github.com/genbio-ai/AIDO and on Hugging Face.Competing Interest StatementThe authors have declared no competing interest.},
URL = {https://www.biorxiv.org/content/early/2024/11/29/2024.11.28.625345},
eprint = {https://www.biorxiv.org/content/early/2024/11/29/2024.11.28.625345.full.pdf},
journal = {bioRxiv}
}
Contact
Please use GitHub issues of
MultiMolecule
for any questions or comments on the model card.
Please contact the authors of the
AIDO.RNA paper
for questions or comments on the paper/model.
aido.rna-650m huggingface.co is an AI model on huggingface.co that provides aido.rna-650m's model effect (), which can be used instantly with this multimolecule aido.rna-650m model. huggingface.co supports a free trial of the aido.rna-650m model, and also provides paid use of the aido.rna-650m. Support call aido.rna-650m model through api, including Node.js, Python, http.
aido.rna-650m huggingface.co is an online trial and call api platform, which integrates aido.rna-650m's modeling effects, including api services, and provides a free online trial of aido.rna-650m, you can try aido.rna-650m online for free by clicking the link below.
multimolecule aido.rna-650m online free url in huggingface.co:
aido.rna-650m is an open source model from GitHub that offers a free installation service, and any user can find aido.rna-650m on GitHub to install. At the same time, huggingface.co provides the effect of aido.rna-650m install, users can directly use aido.rna-650m installed effect in huggingface.co for debugging and trial. It also supports api for free installation.