Functional enrichment analysis asks which biological programs (pathways, curated sets of genes that work together) are active in a sample. A newer family of models builds this question into the network itself. pmVAE, for example, splits an autoencoder into one small subnetwork per Reactome pathway, and each subnetwork only sees that pathway's genes. Single-cell RNA sequencing data is mostly zeros: a typical cell has no detected transcripts for 80–95% of genes. As a result, many pathway subnetworks in many cells receive an input that is entirely zero. When a subnetwork's input is all zeros, its output is a fixed constant that the model computes again and again for every such cell. Hardware designers already know this pattern. Sparse accelerators save work by detecting zero operands and routing around them, and one graph accelerator explicitly bypasses "all-zero" blocks.
We propose to bring that bypass logic to pathway-structured models at the level of whole pathways rather than individual numbers. For each cell, we find the pathways with no detected genes and replace their encoder and decoder computation with a cached constant. The result is identical to the original model, not an approximation. The remaining active pathways run as dense batched matrix products. Because the skip decision is made per pathway rather than per number, it avoids the thread-divergence problem that makes fine-grained zero-skipping slow on GPUs. We pair it with a fidelity check that standard accelerator practice lacks: any approximate skipping beyond the exact tier must leave the pathway enrichment rankings unchanged. Zeroing out small values to manufacture more skips is the obvious way to get there, and it is exactly what can erase the low-copy regulatory genes that enrichment exists to find.
Core Claim
In a pathway-module network whose modules are isolated (pmVAE's design), suppose a cell has zero detected genes in module $m$. With unscaled log-count inputs, so that zero stays zero, the module's first-layer pre-activation is just its bias $b_m$. Every later quantity inside the module, including the latent mean and variance, is therefore a cell-independent constant $c_m$, and the module's mean decoder contribution $D_m(c_m)$ is constant too.
Inference can therefore be written as one shared baseline gene vector plus the contributions of the active modules only. The baseline is $\sum_m D_m(c_m)$, summed over all modules and precomputed once. Each active module contributes $D_m(z_m) - D_m(c_m)$, where $z_m$ is the module's latent for that cell. This rewrite is exact.
We claim three things, each testable:
- Exact skipping removes a fraction of encoder and decoder work equal to the cost-weighted share of empty (cell, module) pairs.
- On GPUs this saving turns into wall-clock and energy gains, which fine-grained sparse kernels struggle to deliver.
- Approximate tiers that skip nearly-empty modules preserve enrichment far better than the magnitude clipping used by vision accelerators, at an equal skip rate.
The first claim is not guaranteed to matter. If each gene in a 20-gene module is detected with probability 0.1, the module is empty in only about 0.9²⁰ ≈ 12% of cells. The payoff therefore depends on how often small, tissue-specific, or rarely detected pathways are empty. Measuring that is the first experiment, and it can kill the project.
Relation to Prior Work
Two pieces of prior work supply the mechanism. GPACE is a graph-network accelerator that uses a sparsity-eliminated queue to bypass all-zero product-quantization centroids. It was evaluated only on citation and social graphs, and its quantization costs about 1% accuracy. We reuse the all-zero bypass idea but apply it to biological pathway modules, and it is exact rather than lossy. SCNN skips at the level of individual operand pairs. It reports that the scatter-accumulate network for partial sums is a major area cost (7.9 mm² for 64 processing elements) and that sparse execution loses to dense hardware above roughly 85% density. That second result constrains our design. Inside an active module, operands are relatively dense, so we run those modules as dense products and skip only whole modules. The decoder scatter problem also shrinks, because only active modules write corrections onto a precomputed baseline.
Other work motivates the proposal by documenting the gap. Wang et al.'s roadmap and the Capra et al. survey explain why irregular fine-grained sparsity rarely becomes real speed on SIMD hardware. pmVAE supplies the model we accelerate. It masks its weights by Reactome membership and represents each pathway as a multidimensional latent, but it runs as masked dense operations on GPUs and never exploits input zeros.
HASS both supplies and constrains the design. It co-designs magnitude pruning and clipping with an FPGA dataflow engine and rebalances compute across unequal layers, reaching up to 5.3× on ResNet-50 with under 0.6 points of accuracy loss on ImageNet. Its clipping step is the approximate-skipping practice we expect to harm low-abundance genes. scPaLM shortens single-cell transformer inputs by quantizing genes into learned pathway tokens. That is a software compression that discards curated pathway identity; we keep pathway identity and skip work only where the exact output is known in advance. DeepSyn reframes enrichment as learning over a literature knowledge graph and is orthogonal to execution cost; we do not compete with it.
Research Program
The work proceeds in four parts.
Measuring skippability. For each dataset we compute the empty-pair fraction and the cost-weighted saving. The cost weight is the module's encoder width plus its decoder fan-out to member genes. We break these numbers down by pathway size, tissue, and sequencing depth. We also write a simple predictive model of the saving from per-gene detection rates, using the empty probability $\prod_{g \in m}(1-p_g)$, where $p_g$ is gene $g$'s detection rate. This tells future users in advance whether skipping pays on their data.
Exact skip kernel. We precompute the constants $c_m$ and the baseline gene vector. For each batch of cells we build an index of active (cell, module) pairs from the sparse input's nonzero structure. Active modules are grouped by width and run as grouped dense matrix products. Decoder corrections from active modules are added onto the baseline with segmented accumulation. The conditions for exactness are part of the deliverable: isolated modules, zero-preserving input transforms, and no normalization across modules or cells inside a module. We test pmVAE as published against these conditions and report any deviation. For training, the latent is sampled, so the empty-module contribution is constant only in its mean. We give an exact treatment when the decoder is linear in the noise, and report the approximation error otherwise.
Enrichment-guarded approximate skipping. We extend skipping to modules with one or two detected genes, either by treating them as empty or by using a small lookup table indexed by which gene was detected. We then compare against a uniform magnitude clip in the style of HASS. Fidelity is measured on outputs biologists actually use: the stimulation classifier built from the interferon module, pathway rankings, and per-gene attribution for low-abundance regulators. The guard sets the approximation level per module, so that rank agreement with the exact model stays above a preset tolerance.
Optional FPGA dataflow prototype. Pathway sizes vary by more than an order of magnitude, which creates the unbalanced-pipeline problem that HASS addresses by reallocating compute across stages. We adapt its rate-balancing search to module groups. This stage runs only if the GPU results show that the skip rate is high enough to justify specialized hardware.
Baselines
Unmodified pmVAE. The naive reference is the published pmVAE implementation: masked dense layers on one GPU, same batch size, same trained weights. It sets both the speed reference and the fidelity reference. On the Kang interferon-β PBMC data, pmVAE reports 0.97 accuracy in identifying stimulated cells from its interferon-α/β module, against 0.76 for an interpretable autoencoder and 0.44 for f-scLVM. I found no reported throughput or energy result on Lacuna for pmVAE or any pathway-module model, so we measure cells per second and joules per cell ourselves.
Fine-grained exact sparse execution. This is the strongest competitor on our question: the input stays in compressed sparse row format and the encoder runs as a library sparse-times-dense multiply, skipping zeros per number. It is exact, needs no new code, and is what a practitioner would try first. It runs on the same GPU with the same weights, and we tune its batch size and storage format with the same budget as our kernel. We beat it if exact module skipping, alone or combined with sparse multiplies inside active modules, achieves at least 1.5× end-to-end throughput or energy improvement at a matched median latent deviation of float-rounding scale. The decoder must be included, since sparse input formats do nothing for the dense decoder output over all genes. No reported result was found on Lacuna for sparse-library execution of pathway models. The closest reported contrast is on a different task: GPACE's 56.3× speedup over GPU-PyG on graph benchmarks, which we cite only as evidence that skipping-aware designs can beat general frameworks, not as a target.
HASS-style magnitude clipping. This is the strongest existing approximate method. Near-zero normalized expression values are set to zero, and the threshold is searched to hit target skip rates of 10%, 20%, and 40% extra modules beyond the exact tier. Our guarded tier beats it if, at the same skip rate, it keeps pathway-ranking agreement and interferon-classification accuracy higher, with the margin judged by bootstrap confidence intervals over cells.
Ablations. The key ingredient is skipping at module granularity, so one ablation applies the same total skip budget per number instead. A second ablation removes the precomputed decoder baseline to isolate the decoder saving.
Why not just…?
Why not just use a GPU sparse matrix library on the sparse input? This is the real threat for the encoder. If most of the cost sits in the first layer, a sparse multiply may capture nearly all the gain without any module logic. It cannot remove decoder work, though, because every module still decodes onto its member genes for every cell. It also pays irregular-access costs, which Wang et al. identify as the reason fine-grained sparsity underdelivers on parallel hardware. The head-to-head encoder-only and end-to-end timings decide this. If the sparse library wins end to end, we report it and recommend it.
Why not just restrict to highly variable genes or filter small pathways? Shrinking the gene set cuts cost cheaply, but it silently changes the biology. Pathways lose members, and small specialized pathways are exactly the ones a filter would drop. We test this by running pmVAE on a 2,000 highly-variable-gene subset and with small-pathway filtering, then measuring ranking agreement with the full model alongside the speed gain. If ranking agreement stays high, that cheaper route deserves to win.
Why not just quantize and run dense? SCNN shows dense hardware beats sparse designs above about 85% density, and Kratos reports a 2.9× area reduction from 8-bit to 4-bit. Quantization is orthogonal to skipping and stacks with it, since active modules run as dense products that can be quantized. We report both alone and combined. The only question is whether skipping adds anything on top of quantization.
Why not just score pathways with classical overrepresentation tests? Those tests are cheap and remain the right tool for list-level questions. This proposal targets users of pathway-latent models, where pmVAE's reported 0.97 against 0.76 and 0.44 shows the model adds discrimination that simpler pathway scoring methods do not reach. We do not reargue that comparison.
Proposed Experiments
Skippability measurement (go/no-go). We measure the cost-weighted empty-module fraction on the Kang interferon-β PBMC data, the Datlinger Jurkat T-cell receptor stimulation data, and Tabula Sapiens (about 500,000 cells, 24 organs), broken down by organ. We set a go threshold of 30% cost-weighted saving on at least the low-depth droplet datasets. Below that, the exact tier is not worth engineering, and we report the negative result together with the detection-rate predictor.
Exactness and speed. We confirm that latent means and reconstructions match unmodified pmVAE to float rounding on all three datasets. We measure throughput, energy from GPU power counters, and memory traffic against the baselines above. We then scale to subsamples of Tahoe-100M, which is cataloged in the virtual cell framework, to check whether savings hold at atlas scale.
Approximate-tier fidelity. At matched skip rates we compare guarded module skipping with magnitude clipping on three measures:
- interferon-module classification accuracy on Kang data, against the 0.97 reference;
- whether the true target pathways stay in the top five of the hypergeometric ranking on Jurkat, as pmVAE reports;
- Kendall rank agreement of full pathway rankings with the exact model.
A targeted check tracks attribution to low-copy regulators. We use genes such as TOP1, which was highlighted in Alzheimer's microglia in the microglia study, applying the same model to that GSE243243 data. The decisive outcome is whether clipping drops these genes' pathways out of the rankings while guarded skipping keeps them at the same compute.
References
- GPACE: An Energy-Efficient PQ-Based GCN Accelerator with Redundancy Reduction
- SCNN: An Accelerator for Compressed-sparse Convolutional Neural Networks
- Deep Neural Network Approximation for Custom Hardware: Where We've Been, Where We're Going
- Hardware and Software Optimizations for Accelerating Deep Neural Networks: Survey of Current Trends, Challenges, and the Road Ahead
- pmVAE: Learning Interpretable Single-Cell Representations with Pathway Modules
- HASS: Hardware-Aware Sparsity Search for Dataflow DNN Accelerator
- Pre-training of Single-cell Language Models through Genetic Pathway Learning
- Deep functional synthesis: a machine learning approach to gene functional enrichment
- Kratos: An FPGA Benchmark for Unrolled DNNs with Fine-Grained Sparsity and Mixed Precision
- Artificial Intelligence Virtual Cells: From Measurements to Decisions across Modality, Scale, Dynamics, and Evaluation
- Analyzing single-cell transcriptome sequencing data reveals immunological mechanisms of microglia-associated diseases