/ Модель

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

Лицензия
Apache 2.0
Архитектура
pore_codec_rsq742c36a · dense
Библиотека
transformers
Опубликована
30 июн 2026

pore-codec-rsq742c36a-519

ЭмбеддингиТекст → embedding3 профессии

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

19скачиваний за 30 дней0лайковвеса обновлены30 июн 2026

Бенчмарки

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

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

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

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

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

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

PoreCodec-RSQ742C36A — лёгкий нейронный кодек для электрических сигналов нанопорового секвенирования. Модель разработана для преобразования непрерывных измерений ионного тока в иерархические последовательности дискретных токенов, пригодные для последующего обучения биологических фундаментальных моделей, поиска и анализа представлений. Карточка указывает архитектуру PoreRSQCodec; метаданные относят её к семейству pore_codec_rsq742c36a и классу dense.

Кодировщик использует пять слоёв одномерных дилатированных свёрток и формирует 512-мерные признаки, сохраняя исходную временную длину: каждому входному отсчёту соответствует один токен. Дискретизация выполняется двумя остаточными квантователями Finite Scalar Quantization с уровнями 7×7×7×7 и размером кодовой книги 2401. Декодер может восстанавливать сигнал из токенов; предобработчик поддерживает исправление границ, удаление выбросов, нормализацию и необязательную фильтрацию. Модель принимает одноканальный сигнал нанопорового тока и выдаёт токены, квантованные представления и реконструированный сигнал.

Модель подходит для токенизации и представления биологических сигналов, компрессии и индексирования нанопоровых чтений, а также как интерфейс сигнал-токен для последующих моделей. Она требует предварительно обработанных сигналов и не выполняет непосредственно basecalling или предсказание нуклеотидной последовательности. Доступна по лицензии Apache-2.0; модельные файлы представлены в формате safetensors.

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

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

Ограничения

Модель рассчитана на предварительно обработанные электрические сигналы нанопорового тока с использованием сопровождающего FeatureExtractor. Она не предназначена для прямого basecalling или предсказания нуклеотидной последовательности.

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

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

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

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

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

Открыть на Hugging Face

PoreCodec-RSQ742C36A

signal_comparison_pore-codec-rsq742c36a-512

PoreCodec-RSQ742C36A is a lightweight neural codec for nanopore electrical signals. It converts continuous ionic current measurements into discrete token sequences while preserving the original temporal resolution of the signal. The model combines a fully convolutional dilated encoder with a production-oriented Residual Finite Scalar Quantization (Residual FSQ) module to generate hierarchical discrete representations suitable for downstream foundation models.

Unlike conventional neural codecs that compress the temporal dimension, PoreCodec maintains a one-to-one correspondence between signal samples and latent tokens. Each input sample produces one discrete token, enabling accurate temporal alignment for biological sequence modeling, retrieval, and representation learning.

Instead of learned vector codebooks, the codec employs deterministic finite scalar quantization with exhaustive codebooks stored directly inside the model checkpoint, providing stable optimization, deterministic encoding, and constant-time decoding.


Highlights

  • One token generated for every input signal sample
  • Full-resolution temporal representation
  • Five-layer dilated convolutional encoder and decoder
  • Residual Finite Scalar Quantization (Residual FSQ)
  • Exhaustive codebooks stored inside safetensors
  • Constant-time O(1) decoding lookup
  • Hierarchical discrete token generation
  • HuggingFace AutoModel compatible
  • End-to-end signal reconstruction
  • Foundation-model ready discrete representation

Architecture

Raw Nanopore Signal
        │
        ▼
 Dilated CNN Encoder
        │
        ▼
512-D Latent Features
        │
        ▼
Linear Projection
        │
        ▼
Residual Finite Scalar Quantization
        │
        ├──────────────► Hierarchical Token IDs
        │
        ▼
Quantized Latent Features
        │
        ▼
Linear Projection
        │
        ▼
 Dilated CNN Decoder
        │
        ▼
Reconstructed Signal

The model consists of three major components.


Dilated CNN Encoder

The encoder extracts local electrical signal patterns using a five-layer one-dimensional dilated convolutional network.

Unlike conventional neural codecs, the encoder does not perform temporal downsampling. Progressive dilation enlarges the receptive field while preserving the original sequence length, allowing every input signal sample to correspond to one latent representation.

PropertyValue
Input Channels1
Output Channels512
Downsampling Factor×1
Receptive Field37 Samples
ArchitectureFive-layer Dilated CNN

Residual Finite Scalar Quantization

The latent representation is discretized using a production-oriented Residual Finite Scalar Quantization (Residual FSQ) module.

Instead of learning vector embeddings as in conventional VQ-VAE methods, PoreCodec performs deterministic scalar quantization over a finite Cartesian lattice.

Each residual stage progressively quantizes the remaining reconstruction error, producing increasingly accurate hierarchical representations.

Compared with learned vector quantizers, Residual FSQ provides:

  • Deterministic encoding
  • Stable optimization
  • No codebook collapse
  • No dead entries
  • Constant-time decoding
  • Exact lookup reconstruction

All exhaustive codebooks are precomputed and stored directly inside the model checkpoint.

Quantization Configuration

ParameterValue
Levels7 7 7 7
Codebook Size2401
Residual Quantizers2
Quantization TypeResidual FSQ

Hierarchical Tokens

Each latent position produces hierarchical residual quantization indices.

Latent Vector

↓

Residual Quantizer 1

↓

Residual Quantizer 2

↓

Residual Indices

↓

Unified Token ID

Supported hierarchy levels:

layerDescription
1First residual quantizer
2First two residual quantizers
0All available quantizers

Since the encoder preserves the original temporal resolution, the number of generated tokens is identical to the number of input signal samples.


Signal Preprocessing

The accompanying FeatureExtractor automatically preprocesses raw nanopore electrical signals before inference.

Pipeline:

  1. Physical boundary correction
  2. Spike removal
  3. Median-MAD normalization
  4. Optional median filtering
  5. Smooth nonlinear clipping

Supported preprocessing strategies:

apple (default)

  • Error repair
  • Spike removal
  • Median-MAD normalization
  • Median filtering
  • Smooth clipping

mongo

  • Error repair
  • Spike removal
  • Median-MAD normalization
  • Smooth clipping

Quick Start

import numpy as np
from transformers import AutoFeatureExtractor, AutoModel

model_name = "ShuaiAnwo/pore-codec-rsq742c36a-512"

feature_extractor = AutoFeatureExtractor.from_pretrained(
    model_name,
    trust_remote_code=True,
)

model = AutoModel.from_pretrained(
    model_name,
    trust_remote_code=True,
)

model.eval()

raw_signal = np.random.normal(
    loc=70,
    scale=8,
    size=1855,
).astype(np.float32)

signal = feature_extractor(
    raw_signal,
    return_tensors="pt",
)["signal"]

token_ids = model.encode_signal(
    signal,
    layer=2,
)

reconstructed = model.decode_token(
    token_ids,
    layer=2,
)

print(signal.shape)
print(token_ids.shape)
print(reconstructed.shape)

Expected output

torch.Size([1, 1, 1855])
torch.Size([1, 1855])
torch.Size([1, 1, 1855])

API Reference

encode_signal

Convert a normalized nanopore signal into unified discrete token IDs.

token_ids = model.encode_signal(
    signal,
    layer=2,
)

Returns

[B, N]

decode_token

Reconstruct normalized nanopore signals directly from unified token IDs.

signal = model.decode_token(
    token_ids,
    layer=2,
)

tokenize_indices

Convert hierarchical residual quantization indices into unified token IDs.

token_ids = model.tokenize_indices(
    level_indices,
    layer=2,
)

decode_indices

Reconstruct signals directly from hierarchical residual indices.

signal = model.decode_indices(
    level_indices,
    layer=2,
)

forward

Perform complete end-to-end encoding and decoding.

reconstruction, level_indices = model(signal)

Returns:

  • Reconstructed signal
  • Hierarchical residual indices

Temporal Alignment

Unlike conventional neural codecs that reduce temporal resolution, PoreCodec preserves the original signal length throughout the encoding pipeline.

For an input signal of length N, the model produces exactly N discrete tokens.

This one-to-one temporal correspondence simplifies downstream integration with biological foundation models, retrieval systems, sequence alignment algorithms, and multimodal learning pipelines.


Validation

The released checkpoint has been validated using the provided evaluation pipeline.

Validation ItemStatus
AutoConfig Loading✅
AutoFeatureExtractor Loading✅
AutoModel Loading✅
End-to-End Encoding✅
End-to-End Decoding✅
Token Length = Signal Length✅
Reconstruction Length = Signal Length✅
Multi-layer Decoding✅

Model Configuration

ParameterValue
CNN ArchitectureFive-layer Dilated CNN
CNN Output Dimension512
Downsampling Factor×1
Receptive Field37
FSQ Levels7 7 7 7
Residual Quantizers2
Codebook Size2401
Data Typefloat32

Applications

PoreCodec is suitable for:

  • Nanopore signal tokenization
  • Biological signal representation learning
  • Neural signal compression
  • Nanopore foundation models
  • Token-based biological language modeling
  • Retrieval and indexing of nanopore reads
  • Generative modeling over nanopore electrical signals
  • Signal-to-token interfaces for multimodal biological AI

Advantages over Conventional VQ

PoreCodec Residual FSQConventional VQ
Deterministic encodingLearned codebooks
No codebook collapseCodebook collapse possible
No dead entriesDead vectors possible
Stable optimizationSensitive optimization
O(1) decoding lookupEmbedding search
Exhaustive finite latticeLearned embeddings
Sample-level temporal alignmentOften temporally compressed

Limitations

This model is designed for preprocessed nanopore electrical current signals using the accompanying FeatureExtractor.

The model produces discrete signal representations and signal reconstructions. It is not intended to perform direct DNA basecalling or nucleotide sequence prediction.


Citation

If you use PoreCodec in your research, please cite:

@misc{jiao2026porecodec,
  title={PoreCodec: Residual Finite Scalar Quantization for Full-Resolution Nanopore Signal Tokenization},
  author={Shuai Jiao},
  year={2026}
}

License

This model is released under the Apache-2.0 License.

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

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

GPU в ailist

Универсальный рантайм · transformers

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

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

Класс архитектуры
PoreRSQCodec
Ревизия весов
a904989

0 моделей