Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adaptive Score-Based VAMP: Self-Tuning Hyperparameters via Tilted EM

arXiv License: MIT

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

Layout

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)

Reproducing the paper figures

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.py

Step 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 40

Experimental setup

Both models use a Bernoulli--Gaussian prior with sparsity $\rho = 0.1$ and a right-rotationally invariant sensing matrix $A = U [I\ 0] V^\top$ with Haar $U, V$, redrawn per trial.

linear CS one-bit CS
model $y = Ax + w$ $y = \mathrm{sign}(Ax + w)$
dimensions $N = 2000$, $M = 1000$ $N = 1000$, $M = 2000$
tuned parameters $\rho, \sigma_x^2, \sigma_w^2$ $\rho, \sigma_x^2$ ($\sigma_w^2 = 1$ fixed)
EM damping $\beta = 1$ (and $0.5$) $\beta = 0.3$
SNR sweep $0$ to $20$ dB $-10$ to $10$ dB (input SNR)

One-bit measurements identify only the ratio $\sigma_x^2/\sigma_w^2$, so $\sigma_w^2$ is fixed as the scale reference. The sweep stops at $10$ dB input SNR because beyond it $\mathrm{sign}(Ax + w)$ becomes nearly scale-invariant and $\sigma_x^2$ is no longer reliably identifiable.

MATLAB implementation

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 $\beta$
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.

Notes

  • 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.

Citation

@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}
}

About

Code for "Adaptive Score-Based VAMP: Self-Tuning Hyperparameters via Tilted EM" — per-module tilted-EM hyperparameter estimation for SC-VAMP, with linear and one-bit compressed-sensing experiments.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages