Code accompanying the paper Adaptive Score-Based VAMP: Self-Tuning Hyperparameters via Tilted EM (arXiv:2607.14597), by Siqi Na and Tadashi Wadayama, Nagoya Institute of Technology.
SC-VAMP composes soft-input soft-output (SISO) modules through a score-based mean--variance interface, but every module needs matched factor hyperparameters. Here each parameterized module re-estimates its own factor by a local tilted-EM M-step that reuses the tilted moments the SISO update has already computed, so the score interface and Onsager correction are untouched.
Three schemes are compared on identical data throughout:
| scheme | hyperparameters |
|---|---|
| oracle | true values |
| adaptive | mismatched initialization, self-tuned by tilted EM |
| frozen | same mismatched initialization, never updated |
python/ code that produces the paper results
adaptive_scvamp_linear.py linear BG CS: SC-VAMP modules + NMSE-vs-SNR sweep
adaptive_scvamp_1bit.py one-bit CS (probit likelihood): modules + sweep
convergence.py fixed-start convergence/recovery panels -> arxiv_*.npz
plot_arxiv_stacked.py renders the two paper figures from arxiv_*.npz
fig_lin_stacked.pdf Fig. 1 (linear BG CS)
fig_1bit_stacked.pdf Fig. 2 (one-bit CS)
matlab/ standalone MATLAB implementation (see below)
Requires uv; dependencies are declared inline (PEP 723), so no environment setup is needed.
cd python
# 1. SNR sweeps (1000 Monte-Carlo trials per point; the heavy step, run on a server)
uv run adaptive_scvamp_linear.py
uv run adaptive_scvamp_1bit.py
# 2. Fixed-start convergence and parameter-recovery panels (cheap, ~1 min)
uv run convergence.py --niter-1bit 40
# 3. Render Fig. 1 and Fig. 2
uv run plot_arxiv_stacked.pyStep 1 writes adaptive_scvamp_{linear,1bit}_results.npz; step 2 combines them
with the fixed-start panels into arxiv_{lin,1bit}.npz; step 3 overwrites
fig_lin_stacked.pdf and fig_1bit_stacked.pdf. Every number plotted
therefore comes from a stored run rather than from hard-coded arrays.
Quick check with fewer trials:
uv run adaptive_scvamp_linear.py --trials-b 30
uv run adaptive_scvamp_1bit.py --trials-b 40Both models use a Bernoulli--Gaussian prior with sparsity
| linear CS | one-bit CS | |
|---|---|---|
| model | ||
| dimensions |
|
|
| tuned parameters |
|
|
| EM damping |
|
|
| SNR sweep |
|
|
One-bit measurements identify only the ratio
matlab/ holds a standalone MATLAB implementation of the same algorithm,
provided for readers who prefer MATLAB. Each script is self-contained (model,
modules, tilted-EM updates and plotting are local functions in one file) and is
run by simply executing it; no toolboxes beyond base MATLAB are required.
| script | what it does |
|---|---|
test_adaptive_scvamp_linear.m |
linear BG CS: parameter recovery and NMSE vs. SNR |
test_adaptive_scvamp_1bit_all.m |
one-bit CS: parameter recovery and NMSE vs. input SNR |
test_adaptive_scvamp_damping.m |
effect of the EM damping factor |
test_adaptive_vs_lasso.m |
adaptive SC-VAMP vs. conventional VAMP/LASSO estimators |
The MATLAB and Python versions share the same model, modules and EM updates,
but use different random number generators (rng(42) vs NumPy
SeedSequence(42)), so their outputs agree statistically rather than
bit-for-bit. The figures in the paper were produced by the Python code; the
MATLAB scripts also use fewer Monte-Carlo trials by default.
- All runs are seeded (
--seed, default 42) and parallelized over trials; results are reproducible for a fixed seed regardless of worker count. - BLAS is pinned to one thread per worker, with parallelism at the trial level.
- Figures embed TrueType (Type 42) fonts and use Helvetica; on systems without it, matplotlib falls back to DejaVu Sans.
@misc{Na2026AdaptiveSCVAMP,
title = {Adaptive Score-Based {VAMP}: Self-Tuning Hyperparameters via Tilted {EM}},
author = {Na, Siqi and Wadayama, Tadashi},
year = {2026},
eprint = {2607.14597},
archivePrefix = {arXiv},
primaryClass = {cs.IT},
url = {https://arxiv.org/abs/2607.14597}
}