ShiftCache: Fast and Exact Indel Effect Prediction by Reusing Shifted Reference Encodings
Organizations: Ray and Stephanie Lane Computational Biology Department, Kenneth C. Griffin School of Computer Science, Carnegie Mellon University, Pittsburgh, PA, USA · Department of Immunology, University of Pittsburgh School of Medicine, Pittsburgh, PA, USA
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 faster than deduplicated dense execution and 1.6 to 2.7 faster than our adaptation of layer-by-layer reuse to indels. It is 3.5 to 4.1 faster than dense reimplementations of two published analyses with Borzoi and AlphaGenome, and 2.6 faster than dense execution with Enformer. Scoring each variant in its own centered 131 kb window makes ShiftCache only 1.36 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 . With larger tile batches, with Enformer or on an H100, a small fraction of values exceeds this tolerance.
Figures & tables
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
| 256 real indels | 512 deletions | |||
|---|---|---|---|---|
| Setting | Dedup dense | ShiftCache | Dedup dense | ShiftCache |
| Default (batch 8, chunk 32) | 82.8 | 17.2 | 84.4 | 14.3 |
| Batch 1 | 83.3 | 16.9 | 82.9 | 13.7 |
| Batch 2 | 83.9 | 17.4 | 83.4 | 14.1 |
| Chunk 16 | 83.6 | 17.2 | 88.1 | 14.8 |
| Chunk 128 | 81.4 | 17.0 | 82.0 | 14.1 |
| Method | First campaign | Later campaigns |
|---|---|---|
| Three-pass dense | 238 | n/a |
| Dedup dense | 222 | 78 |
| ShiftCache, saved cost table | 194 | 17 |
| ShiftCache, calibrating in process | 347 | 17 |
| Tile sizes, tile batch | Real indels | Deletion scan | Matched insertions | Failing fraction |
|---|---|---|---|---|
| 32/128, 16 (default) | 1.00 (40.3 s) | 1.00 (36.5 s) | 1.00 (16.6 s) | 0 |
| 32/128, 8 | 1.02 | 1.01 | 1.02 | 0 |
| 16/64, 16 | 1.01 | 0.99 | 0.95 | 0 |
| 16/128, 16 | 0.98 | 0.97 | 0.94 | 0 |
| 64/256, 8 | 1.09 | 1.19 | 1.23 | 0 |
| 64/256, 16 | 1.08 | 1.18 | 1.21 | 0 |
| Configuration | Real indels | Deletion scan |
|---|---|---|
| Default (tiles 32/128, partial views) | 4.83 | 5.88 |
| Transformer batch 4 | 4.90 | 5.96 |
| Transformer batch 16 | 4.89 | 5.90 |
| Tiles 16/64 | 4.33 | 5.10 |
| Tiles 64/256 | 4.30 | 5.09 |
| Full-length views only | 4.93 | 5.88 |
| Workload | Over Dedup dense [95%] | Over Three-pass dense |
|---|---|---|
| Real indels (37 to 59 per window) | 1.67 [1.62, 1.71] | 2.5 |
| Deletion scan (256) | 1.93 | 4.1 |
| Matched insertions (64) | 1.92 | 2.9 |
Inference Acceleration
Inference acceleration reduces AI model latency, memory use, and serving cost while preserving output quality.
See all 21 papers