OptMRL¶
Convolutional neural network for predicting the mean ribosome load (MRL) of an mRNA from the 50 nucleotides upstream of the coding sequence.
Disclaimer¶
This is an UNOFFICIAL implementation of Interpreting Deep Neural Networks for the Prediction of Translation Rates by Frederick Korbel et al.
The OFFICIAL repository of OptMRL is at ohlerlab/mlcis.
Tip
The MultiMolecule team has confirmed that the provided model and checkpoints are producing the same intermediate representations as the original implementation.
The team releasing OptMRL did not write this model card for this model so this model card has been written by the MultiMolecule team.
Model Details¶
OptMRL is a small 1D convolutional neural network trained to predict the mean ribosome load (MRL), a polysome-profiling-derived translation efficiency proxy, from the 50 nucleotides of 5’ untranslated region (5’UTR) sequence immediately upstream of the coding sequence. The model was first pre-trained on roughly 260,000 random 5’UTR reporters and then fine-tuned on roughly 20,000 endogenous human 5’UTRs. Please refer to the Training Details section for more information on the training process.
The architecture is a stack of three Conv1D layers (120 filters, kernel size 8, same padding, ReLU activation) followed by a Flatten, a 40-unit Dense bottleneck with ReLU activation and dropout, and a final scalar Dense regression head.
Model Specification¶
| Num Layers | Hidden Size | Num Parameters | FLOPs | MACs | Max Num Tokens |
|---|---|---|---|---|---|
| 5 | 40 | 475,641 | 24,036,161 | 12,000,040 | 50 |
Links¶
- Code: multimolecule.optmrl
- Weights: multimolecule/optmrl
- Data: 260,000 random 5’UTR reporters (pre-training) + 20,000 human 5’UTR reporters (fine-tuning)
- Paper: Interpreting Deep Neural Networks for the Prediction of Translation Rates
- Developed by: Frederick Korbel, Ekaterina Eroshok, Uwe Ohler
- Model type: 1D CNN for mean-ribosome-load regression from 5’UTR sequence
- Original Repository: ohlerlab/mlcis
Usage¶
The model file depends on the multimolecule library. You can install it using pip:
| Bash | |
|---|---|
Direct Use¶
Mean Ribosome Load Prediction¶
You can use this model directly to predict the mean ribosome load of a 50-nucleotide 5’UTR window:
Interface¶
- Input length: 50 nt fixed 5’UTR window taken immediately upstream of the coding sequence
- Padding: shorter sequences are right-padded with zeros to 50 nt; longer sequences are truncated to the first 50 nt
- Alphabet:
ACGUonly; unknown /Ntokens contribute zero one-hot signal - Special tokens: do not add (
add_special_tokens=False) - Output: single scalar mean-ribosome-load (MRL) score per window
Training Details¶
OptMRL was first pre-trained on a large random-5’UTR reporter library and then fine-tuned on a smaller library of endogenous human 5’UTRs.
Training Data¶
- Pre-training: ~260,000 random 5’UTR reporters paired with polysome-profiling MRL measurements.
- Fine-tuning: ~20,000 endogenous human 5’UTR reporters paired with polysome-profiling MRL measurements.
Each reporter contributes a 50-nucleotide 5’UTR window immediately upstream of the coding sequence and a scalar MRL label.
Note RnaTokenizer will convert “T”s to “U”s for you, you may disable this behaviour by passing replace_T_with_U=False.
Training Procedure¶
Pre-training¶
The model was first pre-trained as a regression task to predict the measured MRL of each random 5’UTR reporter, then fine-tuned end-to-end on the human-5’UTR reporters using the same regression objective. The published checkpoint is the fine-tuned model.
Citation¶
Note
The artifacts distributed in this repository are part of the MultiMolecule project. If you use MultiMolecule in your research, you must cite the MultiMolecule project as follows:
| BibTeX | |
|---|---|
Contact¶
Please use GitHub issues of MultiMolecule for any questions or comments on the model card.
Please contact the authors of the OptMRL paper for questions or comments on the paper/model.
License¶
This model implementation is licensed under the GNU Affero General Public License.
For additional terms and clarifications, please refer to our License FAQ.
| Text Only | |
|---|---|
multimolecule.models.optmrl
¶
RnaTokenizer
¶
Bases: Tokenizer
Tokenizer for RNA sequences.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Alphabet | str | List[str] | None
|
alphabet to use for tokenization.
|
None
|
|
int
|
Size of kmer to tokenize. |
1
|
|
bool
|
Whether to tokenize into codons. |
False
|
|
bool
|
Whether to replace T with U. |
True
|
|
bool
|
Whether to convert input to uppercase. |
True
|
Examples:
Source code in multimolecule/tokenisers/rna/tokenization_rna.py
OptMrlConfig
¶
Bases: PreTrainedConfig
This is the configuration class to store the configuration of a
OptMrlModel. It is used to instantiate an OptMRL model according to the
specified arguments, defining the model architecture. Instantiating a configuration with the defaults will yield a
similar configuration to that of the OptMRL ohlerlab/mlcis architecture.
OptMRL predicts the mean ribosome load (MRL) of an mRNA from the 50 nucleotides immediately upstream of the coding sequence. The published architecture is a three-layer 1D convolutional stack (same padding, length preserved) followed by a flattening dense bottleneck and a scalar regression head.
Configuration objects inherit from PreTrainedConfig and can be used to
control the model outputs. Read the documentation from PreTrainedConfig
for more information.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
int
|
Vocabulary size of the OptMRL model. Defines the number of input channels of the first convolution.
Defaults to 5 ( |
5
|
|
int
|
The fixed 5’UTR input sequence length OptMRL was trained on (50 nt upstream of the coding sequence). |
50
|
|
int
|
Number of stacked 1D convolutions. The published OptMRL uses three. |
3
|
|
int
|
Number of filters in each convolutional layer. |
120
|
|
int
|
Kernel size (sequence span) of each convolutional layer. Convolutions use |
8
|
|
float
|
Dropout probability applied after the second and third convolutions. |
0.0
|
|
int
|
Number of units in the dense bottleneck consumed by the regression head. |
40
|
|
float
|
Dropout probability applied after the dense bottleneck activation. |
0.2
|
|
str
|
The non-linear activation function used by the convolutional and dense layers. |
'relu'
|
|
int
|
Number of output labels. OptMRL is a single-output regression model, so this defaults to 1. |
1
|
|
HeadConfig | None
|
The configuration of the sequence-level prediction head. Defaults to a regression head
( |
None
|
Examples:
Source code in multimolecule/models/optmrl/configuration_optmrl.py
| Python | |
|---|---|
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | |
OptMrlForSequencePrediction
¶
Bases: OptMrlPreTrainedModel
OptMRL model with a sequence-level prediction head emitting the mean ribosome load (MRL) scalar.
Examples:
Source code in multimolecule/models/optmrl/modeling_optmrl.py
OptMrlModel
¶
Bases: OptMrlPreTrainedModel
The bare OptMRL model outputting the dense bottleneck representation used by the regression head.
Examples:
| Python Console Session | |
|---|---|
Source code in multimolecule/models/optmrl/modeling_optmrl.py
OptMrlModelOutput
dataclass
¶
Bases: ModelOutput
Base class for outputs of the OptMRL model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
`torch.FloatTensor` of shape `(batch_size, dense_size)`
|
The dense bottleneck representation consumed by the MultiMolecule sequence-prediction head. |
None
|
Source code in multimolecule/models/optmrl/modeling_optmrl.py
OptMrlPreTrainedModel
¶
Bases: PreTrainedModel
An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained models.