Skip to content

Releases: clemsgrs/soma

1.8.0

Choose a tag to compare

@clemsgrs clemsgrs released this 13 Jul 22:56

This release turns soma into a first-class FM-benchmarking tool for spatial gene-expression prediction. It lands full HEST-Benchmark reproduction (9 tasks × 3 encoders) on soma's own native extraction stack, adds a new spatial_expression task type and a fast closed-form probe, and hardens the reproduce/ledger machinery so benchmark numbers are recorded, provenance-pinned, and judged against soma itself rather than gated against foreign stacks.

Added

  • spatial_expression dataset_type — predict per-spot gene-expression matrices, with sidecar target-matrix plumbing throughout the pipeline (#263).
  • HEST-Benchmark integration — an IDC curator (#264), a hest/IDC benchmark backed by a new closed-form Ridge+PCA probe (#266), scoped download + fan-out docs (#270), and a full 9-task × 3-encoder (uni2/virchow2/h-optimus-1) native reproduction that publishes the signed delta against HEST's numbers rather than gating on them (#275).
  • Detection-benchmark harness — a multi-dataset encoder-ranking harness for detection tasks (#249).
  • Committed results ledger — reproduced benchmark numbers are now recorded in an append-only, provenance-pinned ledger (soma_commit, slide2vec_version) so drift is caught against soma itself (#253).
  • --curated-dir for soma reproduce — reuse a pre-curated manifest instead of re-curating each run (#274).
  • PatchCamelyon materialization — the curator now builds PCam directly from EVA's official HDF5 (#254).

Changed

  • The EVA reproduce gate is now a 2% relative band with a per-row tolerance_mode, instead of an absolute threshold (#272).
  • Benchmark reference bands render as readable tables with linked sources, and HEST external Reference rows sit beside the Measured row for direct comparison (#271, #267).
  • soma reproduce shares one feature cache across seeds, avoiding redundant extraction (#265).
  • virchow2 is pinned to its CLS-only variant for hest/IDC (#268).
  • Experiment identity is now test-invariant, with an overwrite-test guard (#250).
  • The natural-image control encoder requires slide2vec>=5.3.0 (#243).
  • Recorded eva/gleason_arvaniti reproductions (uni2) and scoped provenance to tracked code (#269, #273).

Fixed

  • Multi-fold CV runs are now resumable — interrupted sweeps pick up where they left off (#252).
  • Transient dense-grid reads retry with bounded backoff instead of failing the run (#251).
  • eva/gleason_arvaniti is runnable end-to-end: tune_is_test fix plus a raw-download materializer (#255).

1.7.0

Choose a tag to compare

@clemsgrs clemsgrs released this 04 Jul 11:09

1.7.0

This release turns soma into a first-class foundation-model benchmarking package. The centerpiece is the benchmarking productization (PRD #210): benchmarks become registered, protocol-as-code citizens with a one-command reproduction path, a faceted leaderboard, and a unified curation schema. Alongside it, Paper-1's FM cell-detection benchmark gains three new dataset slices (MIDOG 2022, MONKEY) and a full decoder-complexity ladder.

Added

  • Benchmark registry + soma reproduce / soma list benchmarks — benchmarks are now registered protocol-as-code; soma reproduce <name> curates → runs → scores → checks per-row tolerance and exits non-zero on failure, with OCELOT as the first registered benchmark (#220).
  • EVA promoted into the registry as the eva/<dataset> family (bach, breakhis, crc, mhist, gleason_arvaniti, patch_camelyon); soma reproduce eva fans out over all members, eva/bach --encoder <name> narrows to one backbone (#221).
  • soma leaderboard — a leaderboard rendered as a pure faceted projection over self-describing run dirs (no stored index), with seed collapse, --vary/--fix/--like facets, and reference-row join in CSV/JSON/HTML (#222).
  • Unified Manifest schema + Protocol-typed curators — one CuratedManifest contract and single writer/validator across classification, segmentation, and detection curators (#218).
  • Packed single-vector feature cache — repeat multi-seed training over cached 1-D features is served from an in-memory packed matrix instead of one file per sample per epoch; numerically identical to the per-file path (#217).
  • MIDOG 2022 mitosis-detection slice — deterministic curator, native single-class F1 scorer (7.5 µm tolerance), and a fixed patient/domain-stratified local held-out split (#240).
  • MONKEY detection slice — curator, the FROC scorer (new to soma, at the challenge's operating points), and a patient-stratified local split (#242).
  • Decoder-complexity ladder — a heavy UPerNet/DPT-lite decoder, a multi-FM ensemble decoder, and a decoder-free attention-map rung, all preserving the d→D-projection fairness invariant (#241).
  • Natural-image control encoder and gpfm / mstar / genbio-pathfm become selectable by raising the slide2vec floor to >=5.3.0 (#243).
  • Non-gating external reference anchors — official/external benchmark numbers render as structured guidance in the leaderboard and docs without acting as the reproduction gate (#227).
  • Benchmarking guide + per-benchmark docs generated from the registry, so rendered numbers are the same bytes the registry scores against (#223).
  • Benchmarking domain glossary (CONTEXT.md) + ADRs 0001–0004 capturing the productization design decisions (#209).

Changed

  • OCELOT config YAMLs de-duplicated onto the packaged benchmark copies as the single source of truth (#224).

Fixed

  • soma reproduce --from-run-dir — resolves a null cache root to output_root/feature_cache (was silently broken for real OCELOT runs) and keys the reference row on the run's own recorded axes instead of defaults, so an encoder is no longer compared against the wrong reference (#225).

1.6.0

Choose a tag to compare

@clemsgrs clemsgrs released this 02 Jul 14:07

soma 1.6.0 turns detection into a first-class, benchmarked task, adds annotation-restricted MIL bags, migrates the dense path onto slide2vec 5.2 streaming extraction with fp16 caching, hardens dense-cache correctness and speed, and ships a restructured docs site with executable tutorials. It also carries several breaking config renames (see below).

Added

  • Detection, end-to-end, benchmarked on OCELOT 2023. The frozen-encoder → dense token grid → heatmap-regression → F1@δ detection path is now validated on a real cell-detection dataset with an honest, published-comparable number. Includes curation (#143), multi-resolution rendering (#156), oracle-bound greedy reporting (#155), a reproduction harness with --set config overrides (#169), encoder×spacing variant configs (#158), the frozen-probe selection→confirmation campaign + results (#206), and a benchmark docs page (#157). Point-matcher assignment is now the matching primitive (#181).
  • Detection qualitative artifacts. Consolidated eval + DetectionArtifactWriter with plain overlays and manifest/metrics CSVs (#182), per-class match-status overlays (#183), opt-in heatmap overlays + npz sidecar (#184), and H&E-legible overlays with eval-only artifact regeneration (#185).
  • Annotation-restricted MIL bags. A tumor-only (mask-restricted) merged bag per slide for dataset_type=slide (#115) and dataset_type=patient (#116), driven by masks/sampling in PreprocessingConfig.
  • fp16 dense-grid cache — dense grids can be stored at half precision, ~halving cache footprint (#166, unified under cache.dtype in #179).
  • evaluation.holdout_test to skip test-split evaluation on tune-only / model-selection runs (#178).

Changed

  • Dense extraction migrated onto slide2vec 5.2 iter_regions_dense streaming; soma's sliding/blend fork deleted (#162). Per-slide memory is now flat (constant RSS), removing the OOM failure mode on large slides. Dependency floor raised to slide2vec[fm]>=5.2.0 (#159, #179).
  • Dense-cache correctness & speed: fixed experiment identity for dense/artifact configs (#129), unified cache-backed dense source handling (#134), tightened cache-completion + metadata-refresh semantics (#135), fast cache scan via a single listing + gated sidecar validation (#141), resumable extraction that encodes only missing samples (#142), encoder skipped when the cache is already complete (#177), and shared dense fold planning extracted (#131).
  • Docs restructured into a task / method / benchmark site — component homes (#196), slide-level task pages + Tasks index (#195), dense task pages + methods matrices (#199), a benchmark layer covering the EVA suite + OCELOT refit (#201), landing re-grid + consistency passes (#204, #205), and CI that skips the Dockerized suite on docs-only PRs (#198). Adds two executable walkthrough tutorials: decoder-free attention-probing segmentation (#202) and multi-encoder composite (#203).
  • Housekeeping: aligned package metadata + public API discovery (#128), implementation-backed docs config examples (#130), all example configs load (#117), OCELOT configs use a relative output/ path and drop the expandable_segments hint (#160, #168).

Breaking

  • Tissue threshold is now a per-class preprocessing.min_coverage map; the scalar is gone (#107).
  • masks/sampling relocated into PreprocessingConfig (#113); the reserved background rule was dropped from the masks vocabulary (#114).
  • Cache dtype unified behind cache.dtype for pooled + dense storage, replacing the dense-only cache.dense_dtype (#179).
  • save_probabilities renamed with symmetric dense-artifact eval flags (#180).
  • Checkpoint metrics renamed to selected (1-based peak epoch, history shim removed) (#133, #136).

1.5.1

Choose a tag to compare

@clemsgrs clemsgrs released this 24 Jun 20:05

A patch release that restores the vim editor to the Docker image. Since the ASAP install step purges libpython3.10* (to keep python3 pinned to the deadsnakes 3.11 interpreter), and Ubuntu 22.04's vim package hard-depends on libpython3.10, vim was being silently cascade-removed from the published image — only the vim-common/vim-runtime data packages survived, so vim was unusable.

Fixed

  • Reinstall vim immediately after the ASAP python3.10 purge so the runtime image ships a working vim again; it pulls libpython3.10 back as a shared library only, leaving the python3 → 3.11 symlink intact. (#105)

1.5.0

Choose a tag to compare

@clemsgrs clemsgrs released this 24 Jun 19:18

This release lands semantic segmentation in soma via the slide-manifest dense path: whole slides plus annotation masks flow through hs2p annotation sampling and slide2vec dense region extraction into cached grids and a segmentation head — validated end-to-end on the BEETLE breast-cancer benchmark. It also realigns soma's dependency floors onto the latest hs2p 4.2.0 / slide2vec 5.0.0 stack.

Added

  • Annotation-aware segmentation ingestion. New dataset_type="segmentation" slide-manifest mode with masks:/sampling: config: slides + multiresolution annotation masks → annotation-sampled ROIs → cached dense grids → segmentation training, wired end-to-end through the existing cached dense path (caching stays soma's responsibility; slide2vec remains a pure extraction engine). (#90)
  • BEETLE recipe on the slide-manifest path. examples/make_beetle_manifest.py (slide-level manifest + CV splits + per-class coverage) and examples/segmentation_beetle.yaml (phikon sliding-224 @ 0.5 µm/px, lightweight_conv decoder). Adds build_label_remap (raw mask pixel → class index, background→ignore) and sliding-window encode so a native-224 encoder can serve a 512 px supervision tile. (#99)

Fixed

  • Dense overlays for slide-manifest ROIs. The overlay writer now reads just the ROI window at the run spacing instead of decoding the whole WSI, fixing a DecompressionBombError that crashed test evaluation — prediction/GT overlays now work on the slide-manifest path. (#101)

Changed

  • Dependency floors realigned: hs2p>=4.2.0 and slide2vec[fm]>=5.0.0. The dense path migrated off hs2p's removed TilingConfig.tissue_threshold scalar to the resolved min_coverage map, with no on-disk cache invalidation. (#103)
  • Sampling aligned with hs2p merged mode (renamed from single), backed by a real un-stubbed sampling integration test against a synthetic pyramidal WSI fixture. (#96)
  • BEETLE docs consolidated: the slide-manifest cached path is now the sole documented recipe; references to the superseded standalone scripts were removed. (#102)
  • CI: skip the test suite and docs build on release-* version-bump PRs (a pyproject-only change carries no signal). (#88, #89)

1.4.0

Choose a tag to compare

@clemsgrs clemsgrs released this 16 Jun 22:41

1.4.0

Added

  • full-image/ROI sliding-window segmentation inference for images larger than a training tile, with reflect padding, Hann-blended softmax stitching, spacing-aware resampling, and fold ensembling. (#75)
  • dense point-detection support for cell/nucleus centroid detection: dataset_type: detection, DetectionManifest, DetectionHead, point CSV supervision, Gaussian peak heatmaps, NMS peak extraction, per-class threshold tuning, and class-aware F1@δ metrics. (#76)
  • detection docs plus dense and slide-level walkthrough notebooks. (#77)

Changed

  • reworked multi-encoder dense composites from top-level encoders: to composite:, with explicit concat resolution/grid controls and per-member
    normalization/window settings.
  • bumped slide2vec[fm] to >=4.6.4. (#79)

Fixed

  • fixed dense composite grid composition so decoder/detection paths concatenate at token-grid resolution correctly. (#78)

1.3.0

Choose a tag to compare

@clemsgrs clemsgrs released this 12 Jun 22:28

1.3.0 — Decoder-Free Attention Segmentation

This release adds support for decoder-free semantic segmentation from foundation-model attention maps, (only slightly) adapted from https://arxiv.org/abs/2602.18747

Highlights

  • Decoder-free attention-map pixel-classifier segmentation (#73) — frozen ViT CLS/register self-attention is treated as a dense feature grid and classified per pixel, without training a decoder.
  • Swappable pixel classifiers (#73) — added xgboost, random_forest, logistic, and pointwise mlp classifiers with class-stratified pixel sampling.
  • Multi-encoder dense feature composition (#73) — multiple encoder outputs can be cached separately, aligned, concatenated, and used together for segmentation.
  • Documented attention segmentation workflow (#73) — added notes on native-spacing sliding-window inference and how soma differs from the resize-based paper behavior.

Notes

This extends the segmentation stack introduced in v1.2.0 with a lightweight decoder-free path for attention-based pixel classification.

1.2.0

Choose a tag to compare

@clemsgrs clemsgrs released this 11 Jun 23:38

v1.2.0 — Semantic Segmentation

This release adds support for dense prediction (semantic segmentation) tasks, extending soma beyond tile/slide/patient-level classification.

Highlights

  • Semantic segmentation pipeline (#69) — frozen foundation-model encoders produce dense token grids (via slide2vec) consumed by a new swappable decoder component that maps features to per-pixel predictions.
  • Spacing-aware reading + live re-encode + window-as-knob sliding (#71) — spacing-aware tile reads, on-the-fly re-encoding, and sliding-window inference where the window size is a tunable knob for dense segmentation.

Notes

This is the first segmentation release and the feature set will continue to expand in future versions.

1.1.3

Choose a tag to compare

@clemsgrs clemsgrs released this 08 Jun 08:37
  • set of PRs to extend soma with survival prediction abilities (#62, #63, #64, #65)
  • add support for splits without test sets (#66)
  • improve slide-level feature caching logic for tile-level feature persistence (#67)

1.1.2

Choose a tag to compare

@clemsgrs clemsgrs released this 04 Jun 02:29
  • drop useless preprocessing parameters (#59)
  • add EVA patch level dataset curatiion code (#60)