MONKEY

Inflammatory-cell detection on the MONKEY public training data with a frozen encoder. soma’s Detection path trains a two-channel decoder and scores merged inflammatory-cell predictions in their source ROI polygons.

Data and task

MONKEY contains 81 PAS-stained kidney-transplant biopsy slides, one per patient, from four centres, with lymphocyte and monocyte point annotations inside 164 ROI polygons.

Setting

Value

Task

Detect lymphocytes and monocytes as two classes during training; merge them into inflammatory cells for the headline score.

Splits

Five deterministic patient folds, balanced across centres. In each rotation one fold is test, the next is tune and the other three are train; each patient is tested once.

Metric

froc_inflammatory: merged inflammatory-cell FROC with greedy matching within 5 µm, averaged over the five test folds.

Fold sizes

Fold

Patients

ROIs

1024 × 1024 tiles

ROI area (mm²)

Lymphocytes

Monocytes

0

17

37

449

12.9

16,281

7,926

1

16

30

301

8.3

10,934

7,544

2

16

34

351

9.2

12,495

5,246

3

16

33

370

10.4

9,410

5,038

4

16

30

375

10.6

9,920

5,442

total

81

164

1,846

51.5

59,040

31,196

In each rotation fold k is test, fold k + 1 (wrapping round to 0) is tune and the other three are train, so each model trains on about 49 patients and 1,100 tiles. Neighbouring tiles overlap by 128 pixels. The curator drops 131 points that lie more than 5 µm outside every ROI polygon; the counts above exclude them.

The official challenge test set is hidden. These cross-validation scores use the public training patients and a different test set from the published MONKEY leaderboard.

Protocol

The recipe is fixed and only the encoder varies.

Setting

Value

Input

ROI crops at approximately 0.242 µm/px, tiled into 1024 × 1024 pixel supervision tiles with 128 pixel overlap. The valid area is each ROI polygon dilated by 5 µm; pixels outside it are ignored.

Encoder

Any compatible frozen dense encoder; a 448 pixel sliding window with 25% overlap supplies the token grids. The committed recipe caches fp16 features.

Decoder

lightweight_conv, with one peak heatmap for lymphocytes and one for monocytes.

Target and loss

Peak Gaussians with σ = 3.33 µm (two thirds of the 5 µm matching distance) and foreground-weighted MSE with weight 10; see Detection.

Training

AdamW, learning rate 0.0003, weight decay 0.0001, cosine schedule, up to 50 epochs. Batch size 1 with 8 accumulation steps; early stopping has patience 10. These settings, and σ as a fraction of the matching distance, were chosen on the OCELOT tune split and carried over unchanged.

Selection

Checkpoints use tune tile F1. Per-class score thresholds are selected on stitched tune ROIs and frozen before scoring stitched test ROIs.

FROC

Pool the two classes and suppress cross-class duplicates within 5 µm. Average sensitivity at 10, 20, 50, 100, 200 and 300 false positives/mm², using the valid ROI area. This merged score differs from the mean of the two per-class FROCs.

Replicates

One seed, 0, across all five patient folds.

Results

Mean merged inflammatory-cell FROC across the five test folds, best first. The table reads the latest recorded result for each encoder. Seeds counts training seeds; any displayed standard deviation is across seeds. A single five-fold run therefore has one seed, and its fold spread is reported separately in the provenance.

Encoder

Inflammatory FROC (mean ± seed std)

Seeds

h-optimus-1

0.310

1

genbio-pathfm

0.307

1

h0-mini

0.297

1

virchow2

0.293

1

conchv15

0.282

1

dinov2-vitb14

0.253

1

midnight

0.249

1

All seven encoders were trained with the recipe above. The packaged Virchow2 target is 0.2929 ± 0.02.

The measurement provenance records each fold’s score, the fold standard deviations and the training software for these rows. It also keeps the earlier recipe’s results and their history.

Reproduce

Prepare the data. Download the public training slides and millimetre-frame annotations into one directory:

aws s3 sync s3://monkey-training /path/to/monkey --no-sign-request \
    --exclude "*" --include "images/pas-cpg/*" --include "annotations/json_mm/*"

Curation describes the ROI crops, ignore masks and patient folds.

Run one seed across all five folds with the default encoder, Virchow2, or choose another compatible installed encoder:

soma reproduce monkey --raw-root /path/to/monkey --record
soma reproduce monkey --encoder uni2 --raw-root /path/to/monkey --record

Reuse prepared manifests or rescore a completed five-fold run. Rescoring reads saved tune/test predictions and performs no training or feature extraction:

soma reproduce monkey --curated-dir /path/to/monkey/curated --record
soma reproduce monkey --from-run-dir soma_reproduce/monkey/seed_0 --record

--record stores the five-fold mean as one seed measurement. The native detection_score/metrics.json also retains every fold value and the population fold standard deviation. Benchmarking describes the shared options.