Inferensys

Glossary

Enformer Network

A transformer-based deep learning architecture from DeepMind that predicts gene expression and epigenomic tracks directly from DNA sequence, leveraging long-range attention mechanisms to model regulatory interactions up to 200 kilobases away.
ML engineer managing model training cluster on laptop, GPU utilization visible, technical deep learning setup.
LONG-RANGE GENE EXPRESSION PREDICTION

What is Enformer Network?

The Enformer network is a transformer-based deep learning architecture that predicts gene expression and epigenomic tracks directly from DNA sequence, using attention mechanisms to capture regulatory interactions spanning up to 200 kilobases.

The Enformer network is a deep learning architecture developed by DeepMind that predicts gene expression and epigenomic profiles from raw DNA sequence. It extends the Basenji2 framework by replacing dilated convolutional layers with transformer attention blocks, enabling the model to integrate regulatory information across 200-kilobase genomic windows—a fivefold increase over previous methods. This long-range receptive field allows Enformer to model distal enhancer-promoter interactions that convolutional architectures miss.

Enformer is trained as a multi-task regression model, simultaneously predicting thousands of CAGE-seq expression tracks and epigenomic assays across multiple human and mouse cell types. The architecture processes one-hot encoded DNA sequences through a convolutional stem followed by transformer layers with factorized attention, which efficiently scale to very long sequences. Its predictions enable in-silico mutagenesis studies that quantify the functional impact of non-coding variants on gene expression, making it a foundational tool for variant effect prediction and regulatory genomics.

ARCHITECTURE DEEP DIVE

Key Architectural Features of Enformer

The Enformer network introduces specific architectural innovations that enable it to predict gene expression and epigenomic tracks from DNA sequences up to 200 kilobases away. These features address the core challenge of capturing distal regulatory interactions.

01

Transformer-Based Long-Range Attention

Enformer replaces the dilated convolutional layers used in earlier models like Basenji2 with multi-head self-attention mechanisms. This allows the model to directly weigh the influence of any nucleotide position on any other position within the 200 kb receptive field. Unlike convolutions, which aggregate information hierarchically, attention computes pairwise interactions globally, enabling the model to learn complex enhancer-promoter loops and distal regulatory syntax without a fixed inductive bias on distance.

02

Convolutional Stem for Local Motif Extraction

Before the transformer layers, a convolutional neural network (CNN) stem processes the raw one-hot encoded DNA sequence. This stem consists of standard convolutional and pooling layers designed to detect local sequence motifs, such as transcription factor binding sites. This hybrid architecture leverages the CNN's strength in pattern recognition within short windows and the transformer's strength in modeling long-range dependencies, creating a hierarchical feature extraction pipeline.

03

Multi-Species and Multi-Task Prediction Heads

Enformer outputs predictions for thousands of genomic tracks covering gene expression (CAGE-seq) and epigenomic marks (DNase-seq, ChIP-seq for histone modifications) across multiple human and mouse cell types and tissues. The model uses a shared trunk network with separate prediction heads for each track. This multi-task learning strategy forces the shared representation to capture universal regulatory grammars, improving generalization to held-out cell types and reducing overfitting on any single assay.

04

Crop and Aggregate for Extended Context

To manage the quadratic complexity of self-attention over very long sequences, Enformer uses a crop and aggregate strategy during training. The full 200 kb input is divided into overlapping crops, each processed independently by the transformer, and the resulting embeddings are aggregated. This technique balances the need for a large receptive field with the computational constraints of the attention mechanism, enabling training on sequences that would otherwise exceed memory limits.

05

Poisson Regression Loss for Count Data

Enformer is trained to predict the raw read counts from sequencing assays, which are non-negative and exhibit heteroscedasticity. The model uses a Poisson regression loss function, which is statistically appropriate for count data. This choice penalizes prediction errors relative to the expected variance, preventing the model from being dominated by high-signal regions and ensuring it learns meaningful patterns in low-coverage regulatory elements.

06

Human and Mouse Cross-Species Generalization

A key architectural validation is the model's ability to generalize across species. Enformer is trained jointly on human and mouse data, using a shared sequence-to-function mapping. The model accurately predicts regulatory activity in one species when given the orthologous sequence from the other, demonstrating that it learns evolutionarily conserved regulatory syntax. This cross-species transfer capability is a powerful test of the model's biological understanding beyond memorization.

ENFORMER NETWORK FAQ

Frequently Asked Questions

Clear, technically precise answers to common questions about DeepMind's Enformer architecture, its mechanisms for long-range gene expression prediction, and its role in genomic sequence analysis.

The Enformer network is a transformer-based deep learning architecture developed by DeepMind that predicts gene expression and epigenomic tracks directly from DNA sequence, with an effective receptive field extending up to 200 kilobases. It works by first processing a one-hot encoded DNA sequence through a series of convolutional layers with exponential dilation to capture local motifs, followed by multi-head self-attention transformer blocks that integrate long-range interactions across the entire input window. The model outputs predictions for thousands of genomic tracks—including CAGE-seq expression, histone modifications, and chromatin accessibility—simultaneously across multiple cell types. By replacing the dilated convolutions of its predecessor Basenji2 with transformers, Enformer dramatically improves the prediction of distal enhancer-promoter interactions and the functional effects of non-coding variants on gene expression.

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.