The Basenji2 architecture is a dilated convolutional neural network that processes raw DNA sequences spanning 131,072 base pairs to predict functional genomic tracks such as chromatin accessibility, transcription factor binding, and histone modifications. It employs exponentially increasing dilation rates in its convolutional layers, enabling the model to capture long-range regulatory interactions across tens of thousands of bases while maintaining computational efficiency. This design allows Basenji2 to model distal enhancer-promoter loops that linear models or short-context networks cannot resolve.
Glossary
Basenji2 Architecture

What is Basenji2 Architecture?
Basenji2 is a deep convolutional neural network framework designed to predict regulatory activity directly from 131-kilobase genomic sequences, capturing distal enhancer-promoter interactions without requiring explicit feature engineering.
Trained jointly on thousands of human and mouse epigenomic datasets, Basenji2 learns a shared regulatory grammar directly from sequence without relying on pre-defined annotations. The architecture's receptive field of 131 kilobases is critical for detecting cis-regulatory elements that act over large genomic distances. By predicting functional activity from sequence alone, Basenji2 enables in-silico mutagenesis to quantify variant effects and serves as a foundational framework for subsequent models like Enformer, which extended this paradigm with transformer-based attention mechanisms.
Key Architectural Features
A deep dive into the convolutional neural network design that enables Basenji2 to predict regulatory activity across 131-kilobase genomic sequences, capturing long-range enhancer-promoter interactions.
Dilated Convolutional Tower
The core feature extractor uses exponentially increasing dilation rates to capture regulatory syntax across multiple scales without pooling. This allows the receptive field to grow to 131 kb while maintaining single-nucleotide resolution.
- Layer 1-4: Standard convolutions for local motif detection
- Layer 5-11: Dilated convolutions with rates doubling from 2 to 64
- Result: Captures both proximal promoters and distal enhancers in a single pass
Multi-Task Prediction Head
Basenji2 simultaneously predicts thousands of functional genomics tracks across multiple cell types and assays from a single shared representation. Each output task corresponds to a specific CAGE, DNase-seq, or ChIP-seq profile.
- Shared trunk: Dilated convolutional tower learns universal regulatory grammar
- Task-specific branches: Linear layers map shared features to individual assay predictions
- Benefit: Cross-task regularization improves performance on data-scarce cell types
Poisson Regression Loss
The model optimizes a Poisson negative log-likelihood loss rather than mean squared error, explicitly modeling the count-based nature of sequencing read coverage. This handles the heteroscedastic noise inherent in genomic assays where variance scales with mean signal.
- Input: Raw sequence one-hot encoding
- Target: Log-transformed read counts per genomic bin
- Advantage: Naturally handles zero-inflated and over-dispersed count data
Reverse-Complement Symmetry
Basenji2 enforces strand invariance by averaging predictions from forward and reverse-complement sequence inputs during training and inference. This biological prior—that regulatory activity is strand-independent—acts as a built-in data augmentation and regularizer.
- Mechanism: Siamese-style twin pass through the network
- Output: Element-wise mean of both strand predictions
- Impact: Reduces overfitting and improves generalization to unseen sequences
Bin-Centric Genomic Tiling
The genome is partitioned into non-overlapping 128 bp bins, and the model predicts aggregate regulatory signal within each bin. This tiling strategy transforms the continuous genome into a discrete grid suitable for convolutional processing.
- Input: 131,072 bp centered on target bin (1,024 bins)
- Output: Scalar prediction per bin per assay
- Design choice: Balances resolution with computational tractability
Residual Skip Connections
Each dilated convolutional block employs residual connections that add the block's input to its output before batch normalization and ReLU activation. This architectural pattern enables stable gradient flow through the deep 11-layer tower and accelerates convergence.
- Pattern: Conv → BatchNorm → ReLU → Conv → BatchNorm → Add Input → ReLU
- Benefit: Mitigates vanishing gradients in deep genomic networks
- Origin: Adapted from ResNet architectures in computer vision
Frequently Asked Questions
Explore the architectural decisions and biological motivations behind the Basenji2 framework, a convolutional neural network designed to predict regulatory activity from extremely long genomic sequences.
The Basenji2 architecture is a deep convolutional neural network designed to predict cell-type-specific regulatory activity directly from 131-kilobase genomic sequences. It works by processing raw DNA sequence as a one-hot encoded input through a series of dilated convolutional layers that exponentially expand the receptive field without losing spatial resolution. This design allows the model to capture distal enhancer-promoter interactions that span tens of thousands of base pairs. The core innovation is the use of grouped, exponentially increasing dilation rates in the middle layers, enabling the network to integrate information across massive genomic distances while maintaining a parameter-efficient profile. The final output is a multitask prediction of functional genomics tracks—such as chromatin accessibility, transcription factor binding, and histone modifications—across multiple cell types simultaneously.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Basenji2 vs. Other Genomic Deep Learning Models
A comparison of key architectural features and performance characteristics between Basenji2 and other prominent sequence-to-function genomic models.
| Feature | Basenji2 | Enformer | DeepSEA |
|---|---|---|---|
Input Sequence Length | 131 kb | 200 kb | 1 kb |
Core Architecture | Dilated CNNs | Transformer + CNNs | CNNs |
Captures Distal Interactions | |||
Multi-Task Prediction | |||
Multi-Species Support | |||
Open Source | |||
Primary Output | Regulatory Activity Profiles | Gene Expression & Epigenomic Tracks | Chromatin Effects of Variants |
Related Terms
Key concepts and frameworks that contextualize the Basenji2 architecture within the broader landscape of sequence-to-epigenome modeling.
Dilated Convolutions
The core architectural innovation enabling Basenji2 to capture distal regulatory interactions. Unlike standard convolutions, dilated convolutions insert gaps between kernel elements, exponentially expanding the receptive field without increasing parameter count or losing resolution. Basenji2 uses 11 dilated convolutional layers with exponentially increasing dilation rates to process 131-kilobase sequences, allowing it to model enhancer-promoter loops spanning tens of thousands of base pairs. This design avoids the quadratic complexity of self-attention while maintaining long-range dependency modeling.
Multi-Task Prediction Heads
Basenji2 simultaneously predicts 4,863 genomic tracks spanning DNase-seq, ChIP-seq, and CAGE assays across multiple human and mouse cell types. Each output head is a separate linear layer operating on the shared latent representation from the dilated convolutional trunk. This multi-task setup enforces representation sharing, where features useful for predicting one assay (e.g., H3K27ac in liver) benefit predictions for related assays (e.g., H3K4me1 in liver). The loss function is a Poisson negative log-likelihood optimized jointly across all tracks.
Sequence-to-Activity Paradigm
Basenji2 belongs to the sequence-to-activity model class, where the sole input is raw DNA sequence (A, C, G, T one-hot encoded) and outputs are continuous epigenomic signal tracks. This contrasts with models requiring pre-computed genomic annotations or evolutionary conservation scores. The paradigm shift means the model must learn regulatory grammar de novo from sequence alone—including motif syntax, spacing constraints, and combinatorial logic—making it a powerful tool for interpreting non-coding variants where no prior functional annotation exists.
Enformer Comparison
Basenji2 and Enformer represent two dominant approaches to long-range regulatory modeling. Basenji2 uses dilated convolutions with a 131 kb receptive field, while Enformer employs transformer self-attention with a 200 kb receptive field. Key trade-offs:
- Basenji2: faster training, lower memory footprint, deterministic receptive field
- Enformer: larger context window, dynamic attention patterns, higher computational cost Both models predict similar epigenomic tracks and are frequently benchmarked against each other for variant effect prediction tasks.
In-Silico Mutagenesis Integration
Basenji2 is tightly coupled with in-silico mutagenesis workflows for variant interpretation. By systematically introducing single-nucleotide substitutions into a reference sequence and measuring the predicted change in epigenomic tracks, researchers can compute allelic effect scores for non-coding variants. This approach has been applied to prioritize causal variants in genome-wide association study (GWAS) loci, linking regulatory disruptions to complex diseases. The model's efficiency—processing thousands of mutated sequences in parallel—makes genome-scale mutagenesis screens computationally feasible.
Poisson Regression Output
Basenji2 models epigenomic assay counts using a Poisson regression framework rather than mean squared error. This is critical because sequencing-based assays produce discrete count data with variance proportional to the mean. The Poisson negative log-likelihood loss naturally handles the heteroscedasticity of genomic signal—regions with high coverage have proportionally higher variance. The output layer uses a softplus activation to ensure non-negative predictions, and the loss is summed across all positions and tracks during training.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us