/ Модель

Характеристики

Контекст
2 048 токенов
Параметры
33,5 млн
Лицензия
CC BY-NC 4.0
Архитектура
prokbert · dense
Опубликована
24 янв 2024

prokbert-mini-long

Заполнение пропусковТекст → текст3 профессии

ProkBERT-mini-long — геномная модель для восстановления замаскированных k-меров ДНК и анализа микробиомных последовательностей.

585скачиваний за 30 дней1лайквеса обновлены17 мар 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

ProkBERT-mini-long — геномная языковая модель группы Neural Bioinformatics Research Group для анализа микробиомных и других геномных последовательностей. Она предназначена для восстановления замаскированных участков ДНК и может служить основой для классификации последовательностей и исследования геномных паттернов.

Модель относится к семейству ProkBERT и использует плотную архитектуру BERT для masked language modeling. В README указаны 26,6 млн параметров, представления размерности 384, контекст до 4096 пар оснований и токенизатор 6-меров со сдвигом 2; метаданные указывают 33,5 млн параметров и контекст 2048 токенов. Модель обучалась на геномных последовательностях с задачей восстановления перекрывающихся k-меров. Вход — последовательности ДНК; модель выдаёт предсказания замаскированных токенов и может использоваться для классификации.

Для подготовки данных последовательности обычно загружают из FASTA, сегментируют на фрагменты подходящей длины и токенизируют. Модель предназначена для геномного анализа, но её результаты за пределами проверенных геномных контекстов не гарантированы и требуют отдельной оценки. Лицензия CC BY-NC 4.0 разрешает использование с указанием авторства, но некоммерческое.

Сценарии применения

  • восстановление замаскированных участков ДНК
  • классификация геномных последовательностей
  • анализ микробиомных последовательностей
  • поиск и изучение геномных паттернов

Ограничения

В README отмечено, что результаты за пределами проверенных геномных контекстов не гарантированы и требуют дополнительной оценки. README и метаданные расходятся по числу параметров и длине контекста: указаны соответственно 26,6 млн против 33,5 млн параметров и 4096 пар оснований против 2048 токенов.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

ProkBERT-mini Model

ProkBERT-mini-long (also prokbert-mini-k6s2) is part of the ProkBERT family of genomic language models, specifically designed for microbiome applications. This model model can provide extended context size up to 4kb sequence by implementing the LCA tokenization with k-mer=6 and shift 2. This model showed comparable performance compare to other family member models.

Simple Usage Example

The following example demonstrates how to use the ProkBERT-mini-long model for processing a DNA sequence:

from transformers import AutoTokenizer, AutoModelForMaskedLM

tokenizer = AutoTokenizer.from_pretrained("neuralbioinfo/prokbert-mini-long", trust_remote_code=True)
model = AutoModel.from_pretrained("neuralbioinfo/prokbert-mini-long", trust_remote_code=True)

segment = "ATGTCCGCGGGACCT"

# Tokenize the input and return as PyTorch tensors
inputs = tokenizer(segment, return_tensors="pt")

# Pass the tokenized input to the model
outputs = model(**inputs)

Model Details

Developed by: Neural Bioinformatics Research Group

Architecture: ProkBERT-mini-k6s1 is based on the MegatronBert architecture, a variant of the BERT model optimized for large-scale training. The model employs a learnable relative key-value positional embedding, mapping input vectors into a 384-dimensional space.

Tokenizer: The model uses a 6-mer tokenizer with a shift of 2 (k6s2), specifically designed to handle DNA sequences efficiently.

Parameters:

ParameterDescription
Model Size26.6 million parameters
Max. Context Size4096 bp
Training Data206.65 billion nucleotides
Layers6
Attention Heads6

Intended Use

Intended Use Cases: ProkBERT-mini-long is intended for bioinformatics researchers and practitioners focusing on genomic sequence analysis, including:

  • sequence classification tasks
  • Exploration of genomic patterns and features

Segmentation and Tokenization in ProkBERT Models

Preprocessing Sequence Data

Transformer models, including ProkBERT, have a context size limitation. ProkBERT's design accommodates context sizes significantly larger than an average gene but smaller than the average bacterial genome. The initial stage of our pipeline involves two primary steps: segmentation and tokenization. For more details about tokenization, please see the following notebook: Tokenization Notebook in Google Colab.

For more details about segmentation, please see the following notebook: Segmentation Notebook in Google Colab.

Segmentation

Segmentation is crucial for Genomic Language Models (GLMs) as they process limited-size chunks of sequence data, typically ranging from 0 to 4kb. The sequence is divided into smaller parts through segmentation, which can be either contiguous, splitting the sequence into disjoint segments, or random, involving randomly sampling segments of length L.

The first practical step in segmentation involves loading the sequence from a FASTA file, often including the reverse complement of the sequence.

Segmentation process:
Segmentation Process

Tokenization Process

After segmentation, sequences are encoded into a vector format. The LCA method allows the model to use a broader context and reduce computational demands while maintaining the information-rich local context.

Basic Steps for Preprocessing:

  1. Load Fasta Files: Begin by loading the raw sequence data from FASTA files.
  2. Segment the Raw Sequences: Apply segmentation parameters to split the sequences into manageable segments.
  3. Tokenize the Segmented Database: Use the defined tokenization parameters to convert the segments into tokenized forms.
  4. Create a Padded/Truncated Array: Generate a uniform array structure, padding or truncating as necessary.
  5. Save the Array to HDF: Store the processed data in an HDF (Hierarchical Data Format) file for efficient retrieval and use in training models.

Installation of ProkBERT (if needed)

For setting up ProkBERT in your environment, you can install it using the following command (if not already installed):

try:
    import prokbert
    print("ProkBERT is already installed.")
except ImportError:
    !pip install prokbert
    print("Installed ProkBERT.")

Training Data and Process

Overview: The model was pretrained on a comprehensive dataset of genomic sequences to ensure broad coverage and robust learning.

Training Process:

  • Masked Language Modeling (MLM): The MLM objective was modified for genomic sequences for masking overlapping k-mers.
  • Training Phases: The model underwent initial training with complete sequence restoration and selective masking, followed by a succeeding phase with variable-length datasets for increased complexity.

Evaluation Results for ProkBERT-mini-long

ModelLAvg. Ref. RankAvg. Top1Avg. Top3Avg. AUC
ProkBERT-mini-long1283.94320.21640.47810.9991
ProkBERT-mini-long2563.50720.24700.52580.9992
ProkBERT-mini-long5123.30260.26690.54350.9992
ProkBERT-mini-long10243.20820.27680.55890.9992

Masking performance of the ProkBERT family.

Evaluation of Promoter Prediction Tools on E-coli Sigma70 Dataset

ToolAccuracyMCCSensitivitySpecificity
ProkBERT-mini0.870.740.900.85
ProkBERT-mini-c0.870.730.880.85
ProkBERT-mini-long0.870.740.890.85
CNNProm0.720.500.950.51
iPro70-FMWin0.760.530.840.69
70ProPred0.740.510.900.60
iPromoter-2L0.640.370.940.37
Multiply0.500.050.810.23
bTSSfinder0.46-0.070.480.45
BPROM0.560.100.200.87
IBPP0.50-0.030.260.71
Promotech0.710.430.490.90
Sigma70Pred0.660.420.950.41
iPromoter-BnCNN0.550.270.990.18
MULTiPly0.540.190.920.22

The ProkBERT family models exhibit remarkably consistent performance across the metrics assessed. With respect to accuracy, all three tools achieve an impressive

MetricProkBERT-miniProkBERT-mini-cProkBERT-mini-longPromotechSigma70PrediPromoter-BnCNNMULTiPly
Accuracy0.810.790.810.610.620.610.58
F10.810.780.810.430.580.650.58
MCC0.630.570.620.290.240.210.16
Sensitivity0.810.750.790.290.520.660.57
Specificity0.820.820.830.930.710.550.59

Promoter prediction performance metrics on a diverse test set. A comparative analysis of various promoter prediction tools, showcasing their performance across key metrics including accuracy, F1 score, MCC, sensitivity, and specificity.

Evaluation on phage recognition benchmark

methodLauc_class1accf1mccrecallsensitivityspecificitytnfpfntpNpNneval_time
DeepVirFinder2560.7349140.6271630.4812130.3090490.3453170.3453170.909856454245032781729500749927580
DeepVirFinder5120.7914230.7080.6377170.4430650.5211920.5211920.889722451055923612570493150692637
DeepVirFinder10240.8262550.74240.7026780.5053330.6056510.6056510.880579438059419823044502649741294
DeepVirFinder20480.8530980.77170.7433390.5571770.66120.66120.8822441158916943306500050001351
INHERIT2560.759820.69430.670120.3931790.6200080.6200080.768833838115419033105500849922131
INHERIT5120.8163260.72280.6514080.4793230.5252480.5252480.914973463843123412590493150692920
INHERIT10240.8465470.72640.6594470.4959350.5270590.5270590.927825461535923772649502649743055
INHERIT20480.8641220.73650.6685950.5185410.53160.53160.9414470729323422658500050003225
MINI2560.8467450.77550.7664620.5528550.7356230.7356230.815505407192113243684500849926.68888
MINI5120.9249730.86570.8591210.7326960.830460.830460.89998456250783640954931506916.3681
MINI10240.9564320.91380.9111890.8296450.8798250.8798250.94813471625860444225026497451.3319
MINI-C2560.8276350.75120.72070.515380.6409740.6409740.861779430269017983210500849927.33697
MINI-C5120.9133780.84660.8348760.697250.7864530.7864530.9051094588481105338784931506917.6749
MINI-C10240.946440.89370.8915640.7884270.8694790.8694790.918175456740765643705026497454.204
MINI-LONG2560.7776970.714950.6862240.4377270.6224040.6224040.80779280651919378262341001699846.10304
MINI-LONG5120.8808310.814050.7980010.6328550.7448790.7448790.881338893512032516734698621013812.1307
MINI-LONG10240.94130.889250.8849170.7814650.8471950.8471950.93174592696791536851610052994830.5088
MINI-LONG20480.9645510.9290.9274550.858780.90770.90770.950395034979239077100001000094.404
Virsorter25120.6207820.62590.3949540.3648310.2476170.2476170.99388450383137101221493150692057
Virsorter210240.7198980.71780.6219190.510360.4617990.4617990.976478485711727052321502649743258
Virsorter220480.8161420.81030.7787240.6475320.66760.66760.953476523516623338500050005737

Column Descriptions

  • method: The algorithm or method used for prediction (e.g., DeepVirFinder, INHERIT).
  • L: Length of the genomic segment.
  • auc_class1: Area under the ROC curve for class 1, indicating the model's ability to distinguish between classes.
  • acc: Accuracy of the prediction, representing the proportion of true results (both true positives and true negatives) among the total number of cases examined.
  • f1: The F1 score, a measure of a test's accuracy that considers both the precision and the recall.
  • mcc: Matthews correlation coefficient, a quality measure for binary (two-class) classifications.
  • recall: The recall, or true positive rate, measures the proportion of actual positives that are correctly identified.
  • sensitivity: Sensitivity or true positive rate; identical to recall.
  • specificity: The specificity, or true negative rate, measures the proportion of actual negatives that are correctly identified.
  • fp: The number of false positives, indicating how many negative class samples were incorrectly identified as positive.
  • tp: The number of true positives, indicating how many positive class samples were correctly identified.
  • eval_time: The time taken to evaluate the model or method, usually in seconds.

Ethical Considerations and Limitations

As with all models in the bioinformatics domain, ProkBERT-mini-k6-s1 should be used responsibly. Testing and evaluation have been conducted within specific genomic contexts, and the model's outputs in other scenarios are not guaranteed. Users should exercise caution and perform additional testing as necessary for their specific use cases.

Reporting Issues

Please report any issues with the model or its outputs to the Neural Bioinformatics Research Group through the following means:

Reference

If you use ProkBERT-mini in your research, please cite the following paper:

@ARTICLE{10.3389/fmicb.2023.1331233,
    AUTHOR={Ligeti, Balázs and Szepesi-Nagy, István and Bodnár, Babett and Ligeti-Nagy, Noémi and Juhász, János},
    TITLE={ProkBERT family: genomic language models for microbiome applications},
    JOURNAL={Frontiers in Microbiology},
    VOLUME={14},
    YEAR={2024},
    URL={https://www.frontiersin.org/articles/10.3389/fmicb.2023.1331233},
    DOI={10.3389/fmicb.2023.1331233},
    ISSN={1664-302X},
    ABSTRACT={...}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · fill-mask

Нельзя запустить

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

Класс архитектуры
ProkBertForMaskedLM
Ревизия весов
93fa164

0 моделей