ShiftCache: Fast and Exact Indel Effect Prediction by Reusing Shifted Reference Encodings

Sina Barazandeh, Arth Banka, Jose Lugo-MartinezarXiv 2026

Predicting how genetic mutations affect biological functions is a cornerstone of modern genomics, but it’s computationally expensive. Large-scale "sequence-to-function" models like AlphaGenome and Borzoi can process up to a megabase of DNA at a time, but scoring millions of insertions and deletions (indels) often requires re-running these massive models from scratch for every single variant.

ShiftCache is a new system designed to eliminate this redundancy. By cleverly caching and reusing "shifted" versions of reference DNA encodings, it achieves up to a 6.5× speedup over standard methods while maintaining exact numerical accuracy.

TL;DR

ShiftCache accelerates indel effect prediction in large genomic models by reusing internal computations from "shifted" reference sequences. It provides a 3.5× to 6.5× speedup over standard execution while ensuring that predictions remain mathematically identical to running the full model.

What Problem Does This Paper Address?

To understand a mutation's effect, researchers compare a model's prediction for the "reference" DNA sequence against the "alternate" (mutated) sequence. For simple single-base swaps (SNVs), most of the DNA stays in the same place, allowing models to reuse most of their internal calculations.

Indels are much harder. An insertion or deletion shifts every subsequent base in the sequence. Because genomic models use "pooling" layers (which downsample the sequence, e.g., grouping every 128 bases into one "bin"), even a one-base shift can completely change how the DNA is grouped internally. This misalignment prevents the direct reuse of reference data, forcing a full, costly re-computation for every indel. For massive projects like the AlphaGenome Atlas, which scored over 100 million indels, this represents a staggering amount of wasted compute.

Methods

ShiftCache introduces a system for exact computation reuse across requests that share shifted segments of a reference sequence.

  1. Shifted Reference Views: If multiple variants involve a 2-base deletion, ShiftCache computes the encoding for the reference sequence shifted by 2 bases exactly once. This "view" is then shared among all relevant variants.
  2. The Planner: A closed-form planner uses the model’s architecture (kernel sizes and pooling strides) to determine which internal "bins" can be safely copied from the reference (the part before the edit) or a shifted view (the part after the edit).
  3. Tiled Execution: Only the small region around the edit that cannot be copied is recomputed. This is done using "tiles"—small batches of input with a "halo" of extra context to ensure the results are bit-for-bit identical to a full-window run.
  4. Stitching Integration: It seamlessly integrates with "stitching" protocols, which combine different model passes to ensure predictions are stable on both sides of an edit.
One shifted encoding serves many requests. To assemble a deletion’s left-anchored alternate encoding, bins before the deletion are copied from the reference, and bins after it are copied from a shifted reference.

Datasets

The authors evaluated ShiftCache across several models and real-world scenarios:

  • Models: AlphaGenome, Borzoi, and Enformer.
  • Real Variants: Indels sampled from the 1000 Genomes Project.
  • Synthetic Scans: Exhaustive deletion and insertion scans (e.g., every possible 1-4 base deletion in a specific region).
  • Published Analyses: Reimplementations of a promoter deletion scan (using Borzoi) and a motif ablation study (using AlphaGenome).

Key Insights and Ideas

  • Restoring Alignment: The core "aha" moment is that while an indel breaks alignment with the original reference grid, it aligns perfectly with a shifted version of that grid.
  • Exactness is Key: Unlike many acceleration techniques that rely on approximations or gradients, ShiftCache is designed to be exact. Under specific architectural conditions (common in genomic CNNs), it produces the same results as dense execution in exact arithmetic.
  • Sharing Efficiency: The system is most effective when many variants share a window and a shift length. For example, a scan of 512 different deletions might only require four shifted reference views.

Key Results

  • Speedups: On AlphaGenome, ShiftCache was 3.5× to 6.5× faster than standard deduplicated execution and 1.6× to 2.7× faster than "layer-local" reuse (a state-of-the-art alternative).
  • Broad Applicability: It sped up Enformer scoring by 2.6× and Borzoi-based promoter scans by 4.0× to 4.1×.
  • Numerical Accuracy: On an NVIDIA A6000, all outputs matched standard execution within a tight tolerance ($10^{-5}$). Using a custom fixed-order kernel, the authors even achieved bitwise identity.
  • Memory Efficiency: ShiftCache typically uses less peak GPU memory than standard execution because it avoids processing full-length sequences for every variant.

Limitations and Future Work

  • Windowing Strategy: The speedup is significantly lower (~1.36×) if every variant is scored in its own unique centered window, as this reduces the opportunity for sharing views.
  • Offset Diversity: If a campaign has many different insertion lengths or highly dispersed edits, the overhead of managing many views can make ShiftCache slower than standard methods.
  • Model Scope: ShiftCache currently accelerates the convolutional "trunk" of models. The downstream transformer "tail" remains a bottleneck that is not accelerated by this method.
  • Resolution: Supporting 1-base resolution outputs (required for some specific biological scoring functions) would require maintaining views at every encoder level, which is a direction for future work.

Summary updated

Abstract

Sequence-to-function models such as AlphaGenome and Borzoi read up to a megabase of DNA and score a genetic variant by comparing their predictions for the reference and alternate sequences. Insertions and deletions (indels) are costly to score, because an indel usually shifts the unchanged DNA after it onto a different pooling grid, which prevents direct reuse of the reference's encoder activations. The AlphaGenome Atlas scored more than 100 million indels with three full model passes each, although the DNA after an indel matches the reference shifted by the indel's length. We present ShiftCache, an exact reuse system that encodes each shifted reference once and shares it among all variants scored in the same window with the same shift. ShiftCache copies every encoder output a variant can reuse and recomputes the rest in batched tiles. On held-out AlphaGenome windows shared by many indels, in strict fp32 on one A6000, ShiftCache is 3.5 to 6.5$\times$ faster than deduplicated dense execution and 1.6 to 2.7$\times$ faster than our adaptation of layer-by-layer reuse to indels. It is 3.5 to 4.1$\times$ faster than dense reimplementations of two published analyses with Borzoi and AlphaGenome, and 2.6$\times$ faster than dense execution with Enformer. Scoring each variant in its own centered 131 kb window makes ShiftCache only 1.36$\times$ faster than deduplicated dense execution, and highly diverse insertion lengths or many dispersed edits can make it slower than layer-by-layer reuse or dense execution. For encoders that meet our conditions, ShiftCache computes the same predictions as dense execution in exact arithmetic. On an A6000, every checked output of the default AlphaGenome and Borzoi runs matches dense execution within an absolute and relative tolerance of $10^{-5}$. With larger tile batches, with Enformer or on an H100, a small fraction of values exceeds this tolerance.
BibTeX
@misc{barazandeh2026shiftcache,
  author = {Sina Barazandeh and Arth Banka and Jose Lugo-Martinez},
  title = {{ShiftCache: Fast and Exact Indel Effect Prediction by Reusing Shifted Reference Encodings}},
  year = {2026},
  eprint = {2611.11976},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.11976},
}

Loading related content...

Figure