Inferensys

Glossary

Multi-Scale Embedding

A deep learning architecture that learns genomic representations at multiple resolutions simultaneously—such as nucleotide, codon, and gene level—by aggregating features from different convolutional kernel sizes or transformer layers.
Data engineer managing feature store on laptop, feature definitions visible, casual data engineering session.
HIERARCHICAL REPRESENTATION LEARNING

What is Multi-Scale Embedding?

Multi-scale embedding is an architectural paradigm that learns genomic representations at multiple biological resolutions simultaneously, capturing patterns from individual nucleotides to whole-gene regulatory syntax within a single unified model.

Multi-scale embedding is a deep learning architecture that aggregates features from different convolutional kernel sizes or transformer layers to represent a genomic sequence at nucleotide, codon, and gene levels concurrently. By processing the input through parallel branches with varying receptive fields, the model constructs a hierarchical latent representation where fine-grained local motifs and long-range regulatory interactions are encoded in a single, unified vector space.

This approach is critical for capturing the nested grammar of the genome, where a point mutation at the nucleotide scale can disrupt a codon, which in turn alters a protein domain. Architectures like Enformer exemplify this by combining convolutional layers for local pattern detection with transformer self-attention for distal enhancer-promoter interactions, enabling the model to predict gene expression from 200,000 base-pair inputs without losing resolution at any biological scale.

Hierarchical Genomic Representation

Key Features of Multi-Scale Embedding

Multi-scale embedding architectures capture biological patterns that operate at vastly different spatial resolutions—from single nucleotide polymorphisms to megabase-scale chromatin domains—within a unified representational space.

01

Parallel Convolutional Branches

The architecture employs multiple convolutional kernels of varying sizes (e.g., 3, 9, 27 nucleotides) operating on the same input sequence simultaneously. Each kernel size captures a distinct biological scale:

  • Small kernels (1-3 bp): Capture dinucleotide biases, splice junctions, and point mutations
  • Medium kernels (9-27 bp): Detect transcription factor binding motifs and codon usage patterns
  • Large kernels (81-243 bp): Model nucleosome positioning and local chromatin structure The outputs are concatenated into a multi-resolution feature map before downstream processing.
3-5
Typical Branch Count
1-243 bp
Receptive Field Range
02

Hierarchical Transformer Layers

Instead of parallel branches, some architectures extract multi-scale features through successive transformer layers with progressive pooling operations. Each layer captures a different level of abstraction:

  • Early layers: Learn local nucleotide dependencies and short-range interactions
  • Middle layers: Aggregate into motif-level and exon-level representations
  • Deep layers: Encode gene-level and long-range enhancer-promoter interactions This mimics the hierarchical organization of the genome itself, from base pairs to topologically associating domains (TADs).
6-24
Transformer Layers
200k+ bp
Max Context Window
03

Feature Pyramid Aggregation

Borrowed from computer vision architectures like FPN (Feature Pyramid Networks), this mechanism fuses feature maps from different scales through top-down pathways and lateral connections. In genomics:

  • Bottom-up pathway: Standard feedforward computation at increasing coarseness
  • Top-down pathway: Upsampled coarse features are merged with fine-grained features
  • Lateral connections: 1x1 convolutions align channel dimensions before element-wise addition This ensures that high-resolution nucleotide-level information is enriched with broader genomic context.
4-5
Pyramid Levels
04

Attention-Based Scale Selection

Rather than manually specifying kernel sizes or pooling ratios, learned gating mechanisms allow the model to dynamically weight the contribution of each scale for a given genomic region. Implementation approaches include:

  • Squeeze-and-excitation blocks: Recalibrate channel-wise feature responses based on global context
  • Gated linear units (GLU): Learn to suppress irrelevant scales for specific prediction tasks
  • Cross-scale attention: Allow features at one resolution to directly attend to features at another This enables the model to automatically emphasize motif-level features in regulatory regions while prioritizing domain-level features in gene deserts.
Adaptive
Scale Selection
05

Multi-Scale Loss Supervision

Training signals are applied at multiple levels of the architecture, not just the final output. This technique, known as deep supervision, ensures that intermediate representations learn meaningful biological features:

  • Auxiliary classifiers attached to intermediate layers predict the same target from partial features
  • Contrastive losses at each scale ensure that representations of functionally similar elements cluster together
  • Reconstruction losses on pooled representations preserve fine-grained information through the hierarchy This prevents vanishing gradients and forces each scale to capture biologically interpretable patterns.
3-4
Supervision Points
06

Dilated Convolution Stacking

An alternative to parallel branches uses stacked dilated convolutions with exponentially increasing dilation rates (1, 2, 4, 8, 16...). This achieves an exponentially growing receptive field without losing resolution or increasing parameter count:

  • Dilation rate 1: Standard convolution, captures adjacent nucleotide dependencies
  • Dilation rate 4: Skips 3 positions, captures codon-level patterns
  • Dilation rate 16: Skips 15 positions, captures enhancer-level interactions This approach, popularized by WaveNet and adapted for genomics, enables processing of 100k+ base pair sequences with a logarithmic number of layers.
100k+ bp
Effective Receptive Field
Log(N)
Layer Complexity
MULTI-SCALE EMBEDDING

Frequently Asked Questions

Clear, technically precise answers to the most common questions about learning genomic representations at multiple resolutions simultaneously.

Multi-scale embedding is an architectural paradigm that learns vector representations of a genomic sequence at multiple biological resolutions simultaneously—such as nucleotide-level, codon-level, and gene-level—by aggregating features extracted from different convolutional kernel sizes, pooling operations, or transformer layer depths. Unlike single-scale approaches that produce one fixed-length vector per sequence, a multi-scale architecture constructs a hierarchy of embeddings where shallow layers capture local motifs like transcription factor binding sites, intermediate layers model domain-level features like exons, and deep layers represent long-range regulatory syntax. This is typically implemented through a feature pyramid network, multi-kernel convolutional blocks, or by concatenating the CLS token representations from every transformer layer. The resulting multi-resolution representation allows downstream decoders to condition predictions on both fine-grained and global context, dramatically improving performance on tasks like gene expression prediction where enhancer-promoter interactions span hundreds of kilobases.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.