R Cell-cell communication scriabin

Speed up Scriabin

Scriabin is one of the slower steps in many single-cell genomics workflows. AutoZyme ships a verified, drop-in patch that is up to 3.01× faster, returning bit-for-bit identical results with no change to how you call it.

Best speedup 3.01×
Median speedup 2.67×
Output equivalence Bit-exact
Best runtime baseline 2.70 min optimized 53.96 s
Datasets 5
Pass rate 9/9

Benchmark charts

Switch benchmark platform; all charts update together
Platform
Speedup distribution
Each dot is one finalized dataset/thread run on Windows
heart_adult_ccim_1k4heart_adult_ccim_1kpbmc68k_ccim_1k3heart_adult_ccim_1k6ifnb_pbmc_ccim_2k4
Thread sweep
Speedup across finalized thread counts on Windows
No finalized multi-thread sweep for this platform.
Memory
Baseline vs optimized peak memory on Windows
0.0 GB25 GB50 GBheart_adult_ccim_…0.08×ifnb_pbmc_ccim_2k40.10×heart_adult_ccim_…0.09×pbmc68k_ccim_1k30.06×heart_adult_ccim_…0.11×heart_adult_ccim_1k6 · largememory 49 GB → 4.1 GBoptimized / baseline 0.08×2.67× speedup · 1 threadsifnb_pbmc_ccim_2k4 · ood_xlargememory 40 GB → 3.9 GBoptimized / baseline 0.10×2.04× speedup · 1 threadsheart_adult_ccim_1k4 · mediummemory 38 GB → 3.3 GBoptimized / baseline 0.09×3.01× speedup · 1 threadspbmc68k_ccim_1k3 · ood_largememory 32 GB → 2.1 GBoptimized / baseline 0.06×2.73× speedup · 1 threadsheart_adult_ccim_1k · smallmemory 20 GB → 2.3 GBoptimized / baseline 0.11×2.95× speedup · 1 threads
baselineoptimized

What is accelerated

The public API stays the same; AutoZyme replaces only the supported fast path.

This task targets scriabin::GenerateCCIM in scriabin. The benchmarked result preserves the declared scientific output gate while reducing CPU runtime on the listed datasets.

Also searched as: cell-cell communication, ligand-receptor, CCC, CCIM.

Supported scope

Fast path is taken ONLY for the default unweighted CCIM call: zyme=TRUE (default), weighted=FALSE, ligands=NULL, recepts=NULL, senders=NULL, receivers=NULL, and database != "custom". Read full supported scope

Fast path is taken ONLY for the default unweighted CCIM call: zyme=TRUE (default), weighted=FALSE, ligands=NULL, recepts=NULL, senders=NULL, receivers=NULL, and database != "custom". In that regime it computes sqrt of the per-LR-pair rank-1 outer products (sender index fastest, receiver slowest) over ALL cells (senders=receivers=colnames(object)) using the OmniPath/CellChatDB/etc. built-in LR resource filtered at lit_support=7, exactly mirroring upstream's pbsapply(tcrossprod) + sqrt + Seurat CCIM constructor + MapMetaData(all columns). Any assay name and slot/layer name are honored (passed through to GetAssayData; a deprecated-slot= shim is installed). species other than human (mouse/rat, or any value) and any non-custom database name are passed through to the cached real LoadLR, which validates them and errors on unsupported values exactly as upstream. Verified bit-exact (ccim_pearson=1, ccim_max_abs_diff=0, ccim_nnz_jaccard=1) across small/medium/large/ood_large/ood_xlarge tiers.

Out-of-scope behavior

silent fallback to upstream

Show detailed speedup table 9 runs
Dataset Tier Platform Threads Baseline Optimized Speedup Memory Concordance Pass
heart_adult_ccim_1k small Windows 1 1.37 min 27.82 s 2.95× 20.2 → 2.3 GB pass
heart_adult_ccim_1k4 medium Windows 1 2.70 min 53.96 s 3.01× 38.2 → 3.3 GB pass
heart_adult_ccim_1k6 large Windows 1 3.30 min 1.23 min 2.67× 49.4 → 4.1 GB pass
ifnb_pbmc_ccim_2k4 ood_xlarge Windows 1 5.46 min 2.67 min 2.04× 39.5 → 3.9 GB pass
pbmc68k_ccim_1k3 ood_large Windows 1 1.94 min 42.63 s 2.73× 32.2 → 2.1 GB pass
heart_adult_ccim_1k small macOS 1 44.34 s 18.06 s 2.46× 18.5 → 3.1 GB pass
heart_adult_ccim_1k4 medium macOS 1 1.54 min 37.12 s 2.49× 19.4 → 4.0 GB pass
ifnb_pbmc_ccim_2k4 ood_xlarge macOS 1 3.31 min 1.72 min 1.93× 19.5 → 4.6 GB pass
pbmc68k_ccim_1k3 ood_large macOS 1 1.07 min 24.02 s 2.67× 19.4 → 2.3 GB pass

Frequently asked questions

Speeding up Scriabin
Why is Scriabin slow?

Scriabin is CPU-bound, and the stock implementation in scriabin leaves performance on the table in its core numerical work. On the benchmark datasets the original takes 2.70 min where the AutoZyme path takes 53.96 s (3.01× faster).

How do I make Scriabin faster?

Install AutoZyme and activate the scriabin patch, then keep using Scriabin exactly as before. AutoZyme transparently substitutes the faster, output-validated path, up to 3.01× faster on the benchmark datasets, with no pipeline or API changes.

Does the AutoZyme speedup change the Scriabin output?

No. The accelerated path returns bit-for-bit identical results to the original scriabin implementation (maximum absolute difference 0), checked by a frozen concordance gate on every benchmark dataset.

How do I install the scriabin speedup?

In R: install the autozyme package, then run library(autozyme) and autozyme::activate("scriabin"). The patch applies automatically the next time you call scriabin::GenerateCCIM.