MPX-to-MPX Virtual Staining#

Virtual staining assesses a model’s understanding of marker co-localization at the subcellular level. The pipeline run_mpx_virtual_staining_tasks inpaints a held-out multiplex channel from the other channels. It requires no benchmarks_config.

Running the Benchmark#

python -m spora_bench.benchmarks.run_mpx_virtual_staining_tasks \
  model_config=<path-to-model-config> \
  datasets_config=<path-to-datasets-config>

For example, on rigamonti2024integrating:

python -m spora_bench.benchmarks.run_mpx_virtual_staining_tasks \
  model_config=configs/models/virtues.yaml \
  datasets_config=configs/datasets/virtues/rigamonti2024integrating.yaml

The pipeline accepts batched submission via lists or wildcards passed to datasets_config.

As a baseline, auto-correlation values between markers can be computed:

python -m spora_bench.tools.compute_correlations dataset_config=<path-to-datasets-config>

Outputs#

For every test tissue, each channel is predicted in turn from the remaining channels; average correlation and mean squared error per marker are saved to output_dir/<model_name>/results/<dataset>_virtual_staining_results.parquet.

The datasets and configs used in the paper are listed in the Task Zoo.