Inferensys

Glossary

HyenaDNA

A genomic language model that replaces the quadratic self-attention mechanism with a sub-quadratic implicit long convolution operator, enabling the processing of ultra-long DNA sequences up to 1 million tokens in length.
ML engineer running AI model benchmarks, performance charts on multiple screens, late night home office setup.
GENOMIC LANGUAGE MODEL

What is HyenaDNA?

A genomic foundation model that replaces quadratic self-attention with a sub-quadratic implicit long convolution operator, enabling the processing of ultra-long DNA sequences up to 1 million tokens in length.

HyenaDNA is a genomic language model that substitutes the standard transformer self-attention mechanism with a Hyena operator, an implicit long convolution that achieves sub-quadratic time complexity. This architectural shift allows the model to process DNA sequences up to 1 million nucleotides in a single context window, dramatically exceeding the typical 512–4,096 token limit of BERT-based genomic models while maintaining competitive perplexity on downstream tasks.

The Hyena operator interleaves implicit global convolutions parameterized by a feed-forward network with element-wise gating, efficiently capturing long-range regulatory interactions without the quadratic memory cost of attention. Pre-trained on the human reference genome using a next-token prediction objective, HyenaDNA learns context-aware nucleotide embeddings that scale linearly with sequence length, making it suitable for analyzing entire genomic loci, including distal enhancers and structural variants, in a single forward pass.

ARCHITECTURE

Key Features of HyenaDNA

HyenaDNA is a genomic foundation model that replaces quadratic self-attention with a sub-quadratic implicit long convolution operator, enabling the processing of DNA sequences up to 1 million tokens in length.

01

Implicit Long Convolutions

The core innovation replacing self-attention. Instead of computing pairwise interactions between all tokens (O(L²) cost), HyenaDNA uses an implicit convolution operator parameterized by a small neural network. This operator learns a long convolution kernel that mixes information across the sequence with sub-quadratic O(L log L) complexity. The kernel is data-dependent, meaning the mixing pattern adapts to the input sequence, unlike fixed convolutional filters. This allows the model to capture long-range regulatory interactions—such as enhancer-promoter contacts spanning hundreds of kilobases—without the memory bottleneck of traditional transformers.

02

Single-Nucleotide Tokenization

Unlike DNABERT or the Nucleotide Transformer which tokenize sequences into overlapping k-mers, HyenaDNA operates directly on single nucleotides as tokens. Each base (A, C, G, T) is embedded into a dense vector, giving the model a vocabulary of just 4 tokens plus special characters. This fine-grained tokenization:

  • Eliminates the need to pre-select an optimal k-mer length
  • Preserves single-nucleotide resolution for variant effect prediction
  • Allows the model to learn its own compositional features from raw bases
  • Simplifies preprocessing and avoids out-of-vocabulary tokens
03

Million-Token Context Window

The sub-quadratic complexity of implicit convolutions enables HyenaDNA to process sequences up to 1 million nucleotides in a single forward pass—roughly the length of an entire human gene locus with all its regulatory elements. This is a 2-3 order of magnitude increase over standard transformer-based genomic models, which are typically constrained to 512–4,096 tokens. The extended context allows the model to:

  • Capture ultra-long-range cis-regulatory interactions
  • Process entire bacterial genomes or human chromosomal segments
  • Model chromatin domain-level features without arbitrary windowing
  • Learn dependencies spanning megabases of linear DNA
04

Hyena Operator Hierarchy

HyenaDNA stacks multiple Hyena operator blocks, each consisting of three core components:

  • Implicit long convolution: A global mixing layer that captures long-range dependencies via a learned, data-dependent kernel
  • Gating mechanism: An element-wise multiplicative gate that controls information flow, similar to the gating in H3 (Hungry Hungry Hippos) architectures
  • Feed-forward network: A standard position-wise MLP for local feature transformation This hierarchy interleaves global context aggregation with local non-linear processing, enabling the model to simultaneously learn short-range motifs (like transcription factor binding sites) and long-range regulatory syntax.
05

Species-Agnostic Pre-Training

HyenaDNA is pre-trained on the human reference genome using a next-token prediction objective adapted for DNA. The model learns to predict the next nucleotide given the preceding context, absorbing the statistical grammar of genomic sequences—including coding regions, splice sites, repetitive elements, and regulatory motifs—without explicit annotation. The learned representations transfer effectively across species due to the conservation of fundamental genomic syntax. Fine-tuning on downstream tasks such as:

  • Chromatin accessibility prediction
  • Transcription factor binding site identification
  • Variant effect scoring requires only a small labeled dataset and minimal compute.
06

Global-Local Representation Learning

By combining implicit long convolutions with gating, HyenaDNA learns a multi-scale representation of genomic sequences. The long convolution kernel captures global context—such as which chromatin compartment or topologically associating domain a region belongs to—while the gating and feed-forward layers preserve local precision for identifying individual binding motifs and splice junctions. This dual representation makes the model effective for tasks requiring both:

  • Element-level prediction (e.g., variant effect at a single nucleotide)
  • Sequence-level classification (e.g., promoter vs. enhancer identity) without architectural modifications between task types.
ARCHITECTURAL COMPARISON

HyenaDNA vs. Transformer-Based Genomic Models

A technical comparison of HyenaDNA's implicit long convolution approach against standard transformer architectures for genomic sequence modeling tasks.

FeatureHyenaDNAStandard TransformerSparse Transformer

Core Mechanism

Implicit long convolution (Hyena operator)

Quadratic self-attention

Local + global sparse attention

Sequence Length Capacity

Up to 1M tokens

512–4K tokens

8K–64K tokens

Computational Complexity

O(N log N)

O(N²)

O(N log N) to O(N√N)

Long-Range Dependency Modeling

Single-Nucleotide Resolution

Memory Footprint at 1M Tokens

Sub-quadratic (feasible on single GPU)

Prohibitive (exceeds GPU memory)

Reduced but still substantial

Pre-training Objective

Next token prediction (autoregressive)

Masked language modeling

Masked language modeling

Strand Invariance Handling

Learned implicitly via data augmentation

Requires explicit reverse complement augmentation

Requires explicit reverse complement augmentation

HYENADNA EXPLAINED

Frequently Asked Questions

Clear, technical answers to the most common questions about the HyenaDNA architecture, its implicit long convolutions, and how it processes genomic sequences up to 1 million tokens in length.

HyenaDNA is a genomic language model that replaces the standard quadratic self-attention mechanism with a sub-quadratic implicit long convolution operator, enabling the processing of ultra-long DNA sequences up to 1 million tokens in length. Unlike transformers, which compute pairwise interactions between every token—resulting in O(L²) memory and time complexity—HyenaDNA employs a Hyena operator that interleaves implicit long convolutions with element-wise gating. The operator projects the input sequence through three parallel linear projections to generate query, key, and value representations. The key and query undergo a depthwise convolution and element-wise multiplication, effectively parameterizing a data-controlled linear convolution kernel. This kernel is applied to the value sequence via the Fast Fourier Transform (FFT), achieving O(L log L) complexity. For genomic sequences, HyenaDNA tokenizes DNA into single nucleotides or k-mers, embeds them, and processes the entire sequence length in a single pass, capturing long-range regulatory interactions spanning hundreds of thousands of base pairs without truncation or chunking strategies required by transformer-based models like DNABERT or Enformer.

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.