Skip to content

Add AMS-SVG (methods/ams_svg) method - #7

Open
mizopl wants to merge 1 commit into
openproblems-bio:mainfrom
mizopl:feat/add-ams-svg-method
Open

mizopl wants to merge 1 commit into
openproblems-bio:mainfrom
mizopl:feat/add-ams-svg-method

Conversation

@mizopl

@mizopl mizopl commented Nov 16, 2026

Copy link
Copy Markdown

Scope & Limitations First

  • Simulation Scope & Data Provenance: All empirical benchmark numbers below were evaluated on the 50 scDesign3-simulated spatial transcriptomics .h5ad datasets from the official Pinello Lab archive (Zenodo Record 18193366, simulation_data.zip + 02_snakemake_simulate_data.tar.gz, exact archive checksums recorded in results/benchmark_50_datasets.json), alongside the published openproblems-bio/results v1.0.0 table (s3://openproblems-data began returning 403 AllAccessDisabled on 2026-11-05; see openproblems-bio/task_predict_modality#85). Performance on scDesign3 Gaussian-process/copula simulations does not establish biological specificity or cell-type-deconvolved accuracy on primary wet-lab tissues, and unnormalized gene-marginal scoring assumes absence of severe unmodeled spot-to-spot capture dropout (tie-free biweight cKDTree equivalence holds whenever coordinate multiplicity satisfies $m(x) \le k_{\text{eff}} + 1$; max observed across all 50 datasets is 2).
  • Dev / Blind Holdout Split: The score_svg(counts, coords) operator (sha256: 4503ac7a6e97aa6816353b486e8c87f7b64f5caeba32c6ae3f486eb6f44a7336) was developed on 4 datasets (42_slide_tag_human_skin_melanoma, 44_stereo_seq_Drosophila_embryo_E7, 34_MERFISH_Human_cortex, 01_10x_Visium_mouse_brain), frozen, and evaluated in a single zero-shot pass across the remaining 46 blind holdout datasets (benchmark_50_datasets.json sha256: db67ac4b9c4a99dac1da6b915c5235263bd65a23cdd8a8bdac87a68f1e412df1). On the matched Zenodo 18193366 .h5ad files, ams_svg exceeds all 14 benchmarked methods on 50 / 50 datasets; when compared across independent RNG realizations against Seqera Cloud v1.0.0, nnsvg is higher on 1 / 50 datasets (01_10x_Visium_mouse_brain: ams_svg = 0.969524 vs Seqera nnsvg = 0.977500, delta = -0.007976, whereas on the matched Zenodo 18193366 .h5ad file nnSVG = 0.953333 and #1 GPcounts = 0.964670).

Method Summary & Container Footprint

src/methods/ams_svg/ implements AMS-SVG directly on openproblems/base_python:1.0.0 using only standard numpy, scipy, pandas, and anndata ([lowtime, lowmem, lowcpu], zero external git+ or apt dependencies, zero GPU):

  1. Gene-Marginal Variance Stabilization (counts only, zero 1 / L_s division): Maps each gene column independently via log1p(y) and Freeman-Tukey sqrt(y) + sqrt(y + 1) - 1 (10.1214/aoms/1177729756), avoiding endogenous spot library-size 1 / L_s spatial contamination (ablation_p3.json sha256: 8b2b6667995ded2828927780989332ced5691e5947ee789dff33c7d0175d60cc).
  2. Multi-Scale Isometry-Invariant Spatial Operators: Combines three tie-free locally density-adapted compactly supported biweight kNN operators (A_{ij} = max(0, 1 - d_{ij}^2 / (sigma_i sigma_j))^2, symmetrized via D^{-1/2} A D^{-1/2}) with three O(2)-invariant low-rank Mercer polynomial-Gaussian operators (O(N M) BLAS, avoiding N x N dense matrices).
  3. Underflow-Free Analytical Permutation Standardization: Computes exact Cliff & Ord (1981) sample-kurtosis-adjusted permutation $Z$-scores on the unbounded real line (10.1093/biomet/37.1-2.17) instead of -log10(p) float64 values that tie at p < 1e-300 (Z >= 37.17).

Summary Across 50 Simulated Datasets (Zenodo 18193366 & Seqera v1.0.0)

Subset ams_svg Mean Kendall's $\tau$ SPARK-X (#1 Overall Mean) 14-Method Per-Dataset Oracle Datasets >= +0.02 vs Zenodo #1 (Both) Datasets Within 0.02 of #1 (Zenodo / Seqera) Mean / Max CPU Time
All 50 Datasets 0.945981 0.884811 (+0.061170) 0.910614 (+0.035367) 37 / 50 (30 / 50) 50 / 50 / 50 / 50 2.08s / 7.91s
Blind Holdout (46) 0.953362 0.892819 (+0.060543) 0.919247 (+0.034115) 34 / 46 (27 / 46) 46 / 46 / 46 / 46 2.15s / 7.91s
Dev Set (4) 0.861095 0.792721 (+0.068374) 0.811333 (+0.049762) 3 / 4 (3 / 4) 4 / 4 / 4 / 4 1.29s / 2.47s

Files Included

  • src/methods/ams_svg/config.vsh.yaml & src/methods/ams_svg/script.py
  • src/workflows/run_benchmark/config.vsh.yaml & src/workflows/run_benchmark/main.nf
  • CHANGELOG.md

Checklist before requesting a review

  • I have performed a self-review of my code

  • Check the correct box. Does this PR contain:

    • Breaking changes
    • New functionality
    • Major changes
    • Minor changes
    • Bug fixes
  • Proposed changes are described in the CHANGELOG.md

  • CI Tests succeed and look good!

— engineered & verified by we* (PROOFER powered by Gemini + @mizopl)

mizopl pushed a commit to mizopl/we-star that referenced this pull request Nov 16, 2026
…k PRs #7 / #1113

- Ship standalone zero-trust verification package solutions/openproblems-spatially-variable-genes-correlation/ (frozen code/method.py 4503ac7a..., ams_svg_eb_v2.py 4c27e253..., 50-dataset Zenodo 18193366 scDesign3 evaluation after s3://openproblems-data 403, ablation_p3, LOAO finite-UMI ceiling, and 9-dataset Depth-Paradox benchmark).
- Add Row #37 to README.md linking open candidate PRs openproblems-bio/task_spatially_variable_genes#7 and elder-plinius/V3R1T4S#1113 with explicit simulation scope boundaries.

— we* (PROOFER powered by Gemini + @mizopl)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant