/ Модель

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

Контекст
1 024 токена
Параметры
26,3 млн
Лицензия
CC BY-NC 4.0
Архитектура
prokbert · dense
Опубликована
15 авг 2023

prokbert-mini

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

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

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

Бенчмарки

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

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

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

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

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

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

ProkBERT-mini — модель семейства ProkBERT от Neural Bioinformatics Research Group для анализа последовательностей ДНК, особенно в задачах микробиомики. Это плотная трансформерная модель на архитектуре MegatronBert с 26,3 млн параметров по метаданным. Она использует токенизатор 6-меров со сдвигом 1, отображает токены в 384-мерное пространство и принимает контекст до 1024 токенов; в README длина контекста также описана как 1024 пары оснований.

Модель предварительно обучена для восстановления замаскированных перекрывающихся k-меров и предназначена для анализа геномных последовательностей, в том числе извлечения закономерностей и классификации. После сегментации и токенизации последовательностей её можно применять для заполнения масок и задач классификации; поддержка text-classification указана в метаданных каталога. Модель не предназначена для обычного текста.

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

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

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

Ограничения

Модель проверялась в ограниченных геномных контекстах, поэтому качество на других типах последовательностей и задачах не гарантируется. Контекст ограничен 1024 токенами; для длинных последовательностей требуется сегментация и токенизация.

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

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

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

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

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

Открыть на Hugging Face

ProkBERT-mini Model

ProkBERT-mini (kmer=6, shift=1) is part of the ProkBERT family of genomic language models, specifically designed for microbiome applications. This model, optimized for DNA sequence analysis, can provide robust and high resolution solutions.

Simple Usage Example

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

from transformers import AutoTokenizer, AutoModelForMaskedLM

tokenizer = AutoTokenizer.from_pretrained("neuralbioinfo/prokbert-mini", trust_remote_code=True)
model = AutoModel.from_pretrained("neuralbioinfo/prokbert-mini", 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 1 (k6s1), specifically designed to handle DNA sequences efficiently.

Parameters:

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

Intended Use

Intended Use Cases: ProkBERT-mini-k6-s1 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

ModelLAvg. Ref. RankAvg. Top1Avg. Top3Avg. AUC
ProkBERT-mini1280.93150.44970.89600.9998
ProkBERT-mini2560.84330.48480.91300.9998
ProkBERT-mini5120.80980.50560.91790.9998
ProkBERT-mini10240.78250.51690.92270.9998

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
Ревизия весов
feb2520

0 моделей