Skip to content

Version 2.1

Latest

Choose a tag to compare

@xis10z xis10z released this 07 Feb 20:16
· 1 commit to master since this release

MRSNet v2.1 Release Notes

MRSNet v2.1 adds new model architectures, sim-to-real analysis with linewidth estimation, improved training and benchmarking tooling, and expanded documentation. This release is based on the pre-2.1 branch and supersedes v2.0.


What's New

New command: sim2real

Analyse the sim-to-real gap between simulated spectra and experimental benchmark data:

./mrsnet.py sim2real --source fid-a-2d --manufacturer siemens --omega 123.23 --linewidth 2.0 -vv

Optional linewidth estimation from data, per-spectrum analysis, and jitter for uncertainty. Results and plots are written to data/sim2real/. See README for --estimate_linewidth, --linewidth_method, and --linewidth_range/--linewidth_step.

New entrypoint: run.py

Run full workflows from JSON configuration (training, benchmark, sim2real). Example configs: etc/run_final.json, etc/run_sim2real.json. See README-run.md for details.

New model architectures

All trainable with ./mrsnet.py train -d <path> -e <epochs> --validate <k> -m <model_string>:

Model prefix Description
encdec_* Encoder–decoder with WaveNet-style blocks and attention GRU
fcnn_* Foundational CNN (CReLU, configurable 7-layer)
qmrs_* CNN–LSTM hybrid with multi-headed MLP
qnet_* QNet: dual-branch with LLS quantification (simplified LLS)
qnet_basis_* QNet with full basis-set LLS and imperfection-factor modulation

Autoencoder and autoencoder-quantifier support is extended and better integrated. See README.md and README-API.md for model strings and parameters.

Sim-to-real and linewidth

  • Linewidth estimation — Automatic estimation from experimental spectra; optional per-spectrum and jitter for sim2real uncertainty.
  • FID-A simulator — Improved linewidth handling, caching (generate_megapress2d_with_cache.m), and mixed linewidth simulation.

Training, selection, and benchmarking

  • KFold and grouped runs with clearer aggregation and optional statistical significance testing.
  • Improved model selection scripts and GPO iteration tracking.
  • Reproducibility: seed handling and deterministic options.
  • Mixed precision support for BasisLLS and QNet; Tikhonov regularization in BasisLLS for stability.
  • Benchmark subcommand: argument filtering and refined defaults (see run_final.json).

Scripts and utilities

  • aggregate.py — Aggregate model results and benchmark metrics.
  • visualize.py — Parameter and correlation analysis, benchmark comparison and sim2real plots.
  • etc/show_benchmark.py — Inspect benchmark data.

Obsolete scripts (etc/construct_spectrum.py, etc/display_spectrum.py, etc/extract-mae.sh) and the standalone FID-A comparison script have been removed; use sim2real and compare instead.

Documentation

  • README.md — Updated for Python 3.12+, TensorFlow 2.20, new commands and models, sim2real, and linewidth.
  • README-API.md — API overview for the mrsnet package and all model classes.
  • README-run.md — Run/orchestration guide for run.py and JSON configs.

Compatibility

  • Python: 3.12+ (tested with 3.13).
  • TensorFlow: 2.20 (see requirements.txt).
  • Existing CNN, YAE, and benchmark workflows remain supported; new models are additive.
  • Setup unchanged: git submodule update --init --recursive and pip install -r requirements.txt.

Upgrading from v2.0

  1. Checkout the v2.1 tag or the master branch after the v2.1 merge.
  2. Update submodules: git submodule update --init --recursive.
  3. Reinstall dependencies: pip install -r requirements.txt.
  4. No config or data layout changes are required for existing pipelines; optional use of run.py, etc/run_final.json, and etc/run_sim2real.json for new workflows.

Links

  • Repository: code-mrsnet (tag v2.1).
  • Paper and data: see README for companion repos (basis, benchmark, model-dist, sim2real results, etc.).