Inferensys

Glossary

Enformer

A deep learning architecture that combines convolutional layers with transformer self-attention to predict gene expression and epigenetic tracks directly from 200,000 base-pair DNA sequences, explicitly modeling long-range regulatory interactions.
ML engineer managing model training cluster on laptop, GPU utilization visible, technical deep learning setup.
DEEP LEARNING ARCHITECTURE

What is Enformer?

Enformer is a deep neural network that predicts gene expression and epigenetic tracks directly from 200,000 base-pair DNA sequences by combining convolutional layers with transformer self-attention to explicitly model long-range regulatory interactions.

Enformer is a deep learning architecture that predicts molecular phenotypes—including gene expression and epigenetic tracks—from raw DNA sequence extending 200,000 base pairs. It integrates a convolutional stem for local motif detection with transformer self-attention blocks that capture distal enhancer-promoter interactions, dramatically improving prediction accuracy for long-range regulatory effects compared to predecessor models like Basenji2.

The architecture processes one-hot encoded DNA through seven convolutional downsampling layers that reduce spatial resolution while extracting hierarchical sequence features, then applies multi-head self-attention across the resulting 896-bp bins. This design enables Enformer to model regulatory elements up to 100 kilobases apart, making it a foundational tool for variant effect prediction and non-coding genome interpretation.

ARCHITECTURE DEEP DIVE

Key Features of Enformer

Enformer integrates convolutional layers with transformer self-attention to predict gene expression and epigenetic tracks directly from 200,000 base-pair DNA sequences, explicitly modeling long-range regulatory interactions.

01

Hybrid Convolutional-Transformer Architecture

Enformer combines a 7-layer convolutional tower with 11 transformer blocks to capture both local sequence motifs and distal regulatory interactions. The convolutional stem uses progressively dilated kernels to expand the receptive field efficiently before passing a compressed representation to the transformer. This hybrid design allows the model to detect transcription factor binding sites at base-pair resolution while simultaneously integrating enhancer activity from 100,000+ base pairs away.

02

200 kbp Input Context Window

Enformer accepts 200,000 base pairs of one-hot encoded DNA sequence as input, a dramatic expansion over earlier models like Basenji2 (131 kbp). This extended context enables the model to capture long-range enhancer-gene interactions that span tens to hundreds of kilobases. The receptive field is achieved through a combination of dilated convolutions in the stem and the global self-attention of the transformer blocks, allowing every output position to attend to the entire input sequence.

200 kbp
Input Sequence Length
5,313
Predicted Tracks (Human)
03

Multi-Species and Multi-Track Prediction

Enformer is trained simultaneously on human and mouse genomes, producing a shared latent representation that captures conserved regulatory grammar. The output head predicts 5,313 genomic tracks for human and 1,643 tracks for mouse, encompassing:

  • CAGE-seq expression data across dozens of tissues
  • ChIP-seq tracks for hundreds of transcription factors
  • DNase-seq and ATAC-seq chromatin accessibility profiles
  • Histone modification marks (H3K4me3, H3K27ac, etc.) This multi-task setup forces the model to learn a unified regulatory code.
04

Explicit Long-Range Dependency Modeling

Unlike purely convolutional models that require many layers to achieve a wide receptive field, Enformer's transformer self-attention explicitly computes pairwise interactions between all positions in the compressed sequence representation. This allows the model to directly link a distal enhancer at position 10,000 with a core promoter at position 150,000. Ablation studies show that removing the transformer layers causes a significant drop in predictive accuracy for genes regulated by far-away elements.

05

Basenji2 Architectural Successor

Enformer is the direct successor to Basenji2, developed by DeepMind and Calico. The key architectural advancement is the insertion of transformer blocks between the convolutional encoder and the prediction head. Basenji2 relied solely on dilated convolutions, which limited its effective receptive field. Enformer retains the multi-task regression objective and Poisson loss function from Basenji2 but achieves substantially higher accuracy on variant effect prediction tasks, particularly for expression quantitative trait loci (eQTLs) located far from their target genes.

06

Variant Effect Prediction via In Silico Mutagenesis

Enformer enables in silico saturation mutagenesis: by introducing a single nucleotide variant into the 200 kbp input and computing the difference in predicted tracks, researchers can estimate the regulatory impact of non-coding variants. The model's ability to capture long-range effects makes it especially valuable for prioritizing distal eQTLs and GWAS hits that fall in gene deserts. Predicted effects correlate strongly with experimentally measured allelic imbalance in reporter assays.

ENFORMER EXPLAINED

Frequently Asked Questions

Clear, technical answers to the most common questions about the Enformer architecture, its mechanisms, and its role in predicting gene expression from long-range DNA sequences.

Enformer is a deep learning architecture that predicts gene expression and epigenetic tracks directly from 200,000 base-pair DNA sequences by combining convolutional layers with transformer self-attention. The model processes a one-hot encoded 200kb input sequence through a series of convolutional blocks that downsample the sequence by a factor of 128, extracting local motif-level features. These features are then passed to transformer layers with multi-head self-attention, which explicitly model long-range interactions between distal regulatory elements—such as enhancers and promoters—across the full 200kb context. The architecture outputs predictions for thousands of genomic tracks, including CAGE-seq expression, DNase-seq accessibility, and ChIP-seq histone marks, at 128-bp resolution. By integrating global attention, Enformer captures regulatory syntax that purely convolutional models like Basenji2 miss, making it a foundational tool for variant effect prediction and regulatory genomics.

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.