Parallax Pathology · Technical note
Short technical note and public artifact
Russell Parrish · analysis carried out with AI assistants · Version 3, 11 November 2026
Read the matched metric comparison · GitHub release v3.0.0 · Download the public control example
PathoROB asks whether a foundation model's representation is organised by biology or by medical centre. Its Robustness Index (RI) compares, among each tile's nearest neighbours, those with the same tissue class from another centre against those with another tissue class from the same centre [1]. The published leaderboard lists 26 models.
The study began with one question, written down before any tile was measured: where does a fixed, training-free instrument sit on this index? The answer led to three further questions, each taken in turn:
| Item | Value |
|---|---|
| Benchmark | PathoROB repository at commit d81a04b, its own robustness_index entry point, default arguments. No benchmark code was edited. |
| Neighbours (default k) | TCGA 61 (paired 2 × 2 design), Camelyon 11, Tolkach 46. |
| Data | The benchmark’s source inventory of 256 × 256-pixel tiles: Camelyon 22,402 [4], TCGA 60,690 [5], Tolkach oesophageal 16,300 [6]. 99,392 tiles; 5, 26 and 4 medical centres. |
| Random features | 42 independent Gaussian columns per tile, three seeds. |
| Colour | Mean and standard deviation of R, G and B per tile (6 numbers). |
| Fixed instrument | parallax-core42 v1.0.0 [2]: 42 named measurements per tile from fixed formulas, no training. Measured on the raw tile, and again with its bundled fixed-target Macenko normaliser. |
| Foundation model | Phikon-v2 [3], extracted with the benchmark's own wrapper and extractor. Chosen because its weights are open and because its hospital pull on Camelyon matches the colour reference (section 3.3). |
| Scaling | Colour and fixed-instrument columns were standardised within each dataset over its full tile inventory. Gaussian draws entered without column standardisation. The scorers applied their own L2 row normalisation. |
| Checks on our pipeline | The results shipped in the repository for UNI2-h and Phikon-v2 equal the leaderboard values. Our own Phikon-v2 extraction reproduces its shipped index within 0.0002 on each dataset (0.6188, 0.0189, 0.7682). |
The instrument returned a valid status on every tile. Eight of its values were undefined (seven in Tolkach, one in Camelyon) and were set to the dataset mean, as planned.
| TCGA | Camelyon | Tolkach | Average | |
|---|---|---|---|---|
| Random features, RI (mean of 3 seeds) | 0.500 | 0.499 | 0.300 | 0.433 |
| Published models below that level | 0 of 26 | 11 of 26 | 0 of 26 | |
| Published range | 0.511 to 0.879 | 0.011 to 0.940 | 0.693 to 0.965 |
The no-signal level is not the same number on each dataset. The index compares counts of two kinds of neighbour, and how often each kind occurs for unrelated tiles depends on the dataset's mix of classes and centres. A score of 0.60 therefore sits 0.10 above no signal on TCGA and 0.30 above it on Tolkach, and an average over the three datasets mixes those scales.
On Camelyon, the 11 models below the random-feature level are MUSK, Prov-GigaPath, RETCCL, RudolfV, Kaiko ViT-B/8, UNI, Ciga, CTransPath, Kang-DINO, Phikon-v2 and Phikon (0.467 down to 0.011). For these, neighbours follow the hospital more than they would for unrelated tiles.
| TCGA | Camelyon | Tolkach | Average | |
|---|---|---|---|---|
| Colour only, RI | 0.463 | 0.009 | 0.237 | 0.236 |
| Colour only, kNN tissue balanced accuracy | 0.660 | 0.794 | 0.542 |
Six colour numbers score below every published model on Camelyon (0.009 against a lowest published value of 0.011), and below the random-feature level on all three datasets. They are not uninformative: their tissue balanced accuracy is well above the random-feature values in section 3.4. On Camelyon, colour separates tissue and separates hospitals, and the hospitals dominate the neighbourhoods.
Two quantities read against the random-feature run on the same dataset:
| Tissue signal / hospital pull | TCGA | Camelyon | Tolkach |
|---|---|---|---|
| Fixed instrument | 0.48 / −0.03 | 0.68 / 0.03 | 0.57 / −0.23 |
| Fixed instrument + its normaliser | 0.44 / −0.03 | 0.69 / 0.01 | 0.56 / −0.30 |
| Colour only | 0.41 / 0.04 | 0.60 / 0.49 | 0.47 / 0.06 |
| UNI2-h (shipped result) | 0.90 / −0.30 | 0.97 / −0.05 | 0.97 / −0.62 |
| Phikon-v2 (shipped result) | 0.86 / −0.12 | 0.91 / 0.48 | 0.95 / −0.47 |
On Camelyon, Phikon-v2 and RGB had similar differences from the Gaussian RI reference (about 0.48 and 0.49), while their chance-adjusted tissue balanced accuracies differed (0.91 and 0.60). Comparable RI can coexist with different tissue discrimination.
| TCGA | Camelyon | Tolkach | Average | Rank if added (of 27) | |
|---|---|---|---|---|---|
| Fixed instrument, RI | 0.527 | 0.471 | 0.534 | 0.510 | 23 |
| With its fixed-Macenko normaliser, RI | 0.531 | 0.492 | 0.598 | 0.540 | 22 |
| Published models below the instrument | 1 of 26 | 11 of 26 | 0 of 26 | 4 of 26 |
| kNN tissue balanced accuracy | TCGA | Camelyon | Tolkach |
|---|---|---|---|
| Fixed instrument | 0.699 | 0.836 | 0.626 |
| Colour only | 0.660 | 0.794 | 0.542 |
| Random features | 0.419 | 0.483 | 0.138 |
| UNI2-h (shipped result) | 0.942 | 0.985 | 0.976 |
| Phikon-v2 (shipped result) | 0.920 | 0.954 | 0.959 |
The plan predicted that the instrument would sit low on average, plausibly below most foundation models, and that Camelyon was the dataset where it could land among them. Both held: rank 23 of 27 on average, above 11 of 26 models on Camelyon. The instrument is built to be sensitive to how a slide was handled, so a low index is its expected operating window on this benchmark. Its tissue signal is modest beside the foundation models'.
Logistic regression predicting the medical centre, five folds grouped by slide (by case for TCGA), all tiles. Accuracy / balanced accuracy / one-vs-rest AUC:
| Fixed instrument (42) | Colour (6) | Both (48) | Random (42) | |
|---|---|---|---|---|
| TCGA, 26 centres | 0.33 / 0.15 / 0.79 | 0.34 / 0.15 / 0.80 | 0.45 / 0.27 / 0.87 | 0.15 / 0.04 / 0.50 |
| Camelyon, 5 centres | 0.83 / 0.72 / 0.96 | 0.93 / 0.64 / 0.98 | 0.95 / 0.83 / 0.99 | 0.40 / 0.20 / 0.50 |
| Tolkach, 4 centres | 0.62 / 0.59 / 0.84 | 0.81 / 0.81 / 0.94 | 0.87 / 0.87 / 0.98 | 0.30 / 0.25 / 0.50 |
Colour alone matches or exceeds the instrument alone on accuracy and AUC on every dataset. Adding the 42 measurements to colour raises balanced accuracy on all three (0.15 to 0.27, 0.64 to 0.83, 0.81 to 0.87). The benchmark paper reports that the centre can be predicted from foundation-model features with 88% to 98% mean accuracy [1]; its protocol may differ from this one.
Can changing the metric reverse the colour result? We scored the same six RGB statistics and three Gaussian seeds under RI, margin-aware RI (MaRI) and the cross-confounder robustness margin (CRoMa) [10]. RGB scored below every seed under every metric in each cohort. The margins reveal how far apart the two kinds of neighbours were.
The two neighbour types are same tissue, other centre and other tissue, same centre. RI counts them within a fixed neighbourhood. MaRI gives more weight to closer neighbours, with a temperature set separately for each representation and cohort. CRoMa finds the five closest eligible neighbours of each type, compares their mean cosine distances and divides the difference by their sum. A negative margin means the same-centre group was closer. The share at or below zero measures frequency. The mean among margins at or below the 10th percentile measures severity at the adverse end of the distribution.
| Cohort | Control | RI | MaRI | CRoMa | CRoMa tail mean | Margin ≤ 0 | Fixed-k support |
|---|---|---|---|---|---|---|---|
| TCGA 2×2 | Gaussian | 0.500 | 0.500 | ≈0 | −0.059 | 50.0% | 100.00% |
| TCGA 2×2 | RGB | 0.463 | 0.457 | −0.168 | −0.868 | 55.3% | 98.58% |
| Camelyon | Gaussian | 0.499 | 0.499 | ≈0 | −0.051 | 50.1% | 99.96% |
| Camelyon | RGB | 0.009 | 0.006 | −0.888 | −0.979 | 97.1% | 63.41% |
| Tolkach ESCA | Gaussian | 0.300 | 0.300 | −0.031 | −0.086 | 84.6% | 100.00% |
| Tolkach ESCA | RGB | 0.237 | 0.281 | −0.442 | −0.922 | 73.6% | 98.33% |
TCGA illustrates what a pooled score can hide. Colour RI was 0.463 against a Gaussian reference of 0.500. The colour headline margin was −0.168 and its lower-tail mean was −0.868, versus −0.059 for Gaussian. The colour tail contained 11,280 occurrences, representing 8,878 distinct tiles from 942 slides and all 94 pairings. All 11,280 already had fixed-k support. Here the deeper tail comes from measuring distance among covered observations. Repeated tiles count once per pairing in this calculation.
Camelyon distinguishes missing evidence from adverse evidence. For RGB, 12,935 of 20,400 tiles had fixed-k support. Fully 12,794 of those supported tiles had local RI equal to zero, so its tie-inclusive lower tail has mean zero and covers almost the entire supported set. CRoMa scored all 20,400. Among the 7,465 tiles without fixed-k evidence, 6,971 (93.4%) had nonpositive margins. Of the 2,040 tiles in the CRoMa lower tail, 2,033 already had fixed-k support. Extending coverage and resolving severity within the covered tiles are distinct contributions.
Tolkach separates frequency from severity. Gaussian produced more nonpositive margins than RGB (84.6% versus 73.6%). Its lower-tail mean was only −0.086, while RGB reached −0.922. Thus a count of which neighbour type wins and a measure of how far it wins can order the same controls differently.
Scope. This comparison scores 88,650 distinct tiles from the 99,392-tile feature inventory. It preserves TCGA's 94 paired 2×2 comparisons (59,250 distinct tiles), the two-centre Camelyon scoring manifest (20,400 tiles), and reduced three-centre Tolkach ESCA (9,000 tiles). All metrics exclude the query slide. Centre is an observational label that can capture tissue mix, staining, scanning and other differences. The three seeds describe simulation variation. They supply no patient-level uncertainty estimate. The margins in this section concern the two public controls only.
Medical interpretation. “Same tissue” means the same supplied benchmark label. Camelyon has tumour/normal labels, TCGA uses project-level cancer classes, and reduced Tolkach uses six tissue annotations. A nonpositive margin includes exact ties. It describes distances between labelled representations and gives neither a misclassification count nor a probability of patient harm. No patient outcomes or diagnostic decisions entered the control analysis. Three simulation seeds and repeated tile occurrences do not provide independent patient- or hospital-level replication.
The comparison plan fixed the three metrics before scoring. The tail-membership counts and coverage cross-tabulations above are descriptive second-pass checks. Across 12 runs the maximum RI difference between packages was 0.000009, attributable to near-tied neighbours at the cutoff. In an exhaustive check of 576 sampled occurrences the largest CRoMa margin discrepancy was 0.000023. The example includes the full-precision scores and the scripts to recover the local values. Download the reproducible example.
The plan was written and hashed before any Phikon-v2 feature was extracted. Per dataset, every one of Phikon-v2's feature dimensions is regressed on a set Z of fixed measurements (ordinary least squares with intercept, Z standardised, all tiles of that dataset, no labels of any kind). The residual is kept and scored by the benchmark, unchanged. The sets:
Criterion, fixed in advance. A removal works on a dataset if its RI gain exceeds the best random-column gain by at least 0.05 and tissue balanced accuracy stays within 0.02 of the unmodified model. Prediction. Removing colour raises the Camelyon index. No direction was claimed for the instrument beyond colour.
Forty-eight named numbers predict 12.7%, 30.9% and 27.5% of the model's feature variance on TCGA, Camelyon and Tolkach. Random columns predict 0.1% to 0.3%. The instrument alone predicts more than colour alone on every dataset (25.1% against 20.5% on Camelyon).
| Removed (RI / tissue bal. acc. / centre AUC) | TCGA | Camelyon | Tolkach | Avg RI | Rank |
|---|---|---|---|---|---|
| Nothing (Phikon-v2) | 0.619 / 0.920 / 0.980 | 0.019 / 0.954 / 1.000 | 0.768 / 0.959 / 0.998 | 0.469 | 26 |
| Instrument (42) | 0.642 / 0.921 / 0.977 | 0.361 / 0.946 / 0.646 | 0.764 / 0.939 / 0.863 | 0.589 | 21 |
| Colour (6) | 0.673 / 0.926 / 0.975 | 0.411 / 0.952 / 0.865 | 0.826 / 0.948 / 0.903 | 0.637 | 17 |
| Both (48) | 0.678 / 0.921 / 0.969 | 0.494 / 0.950 / 0.902 | 0.828 / 0.941 / 0.669 | 0.667 | 16 |
| Five "breaks" axes | 0.630 / 0.925 / 0.980 | 0.045 / 0.955 / 1.000 | 0.786 / 0.952 / 0.979 | 0.487 | 24 |
| Leave-dataset-out axes (11 / 3 / 20) | 0.648 / 0.926 / 0.978 | 0.083 / 0.955 / 0.912 | 0.778 / 0.948 / 0.938 | 0.503 | 23 |
| Random columns (range of 3) | 0.614 | 0.024 to 0.025 | 0.770 to 0.771 | 0.469 to 0.470 | 25 |
Rank places each average against the 26 published rows, which include Phikon-v2 itself. Centre AUC is the benchmark's own linear hospital-prediction score; it reflects folds below 0.5, so noise scores above 0.5.
| Criterion met? (RI gain) | TCGA | Camelyon | Tolkach |
|---|---|---|---|
| Instrument | no (+0.023) | yes (+0.342) | no (−0.004) |
| Colour | yes (+0.055) | yes (+0.392) | yes (+0.057) |
| Both | yes (+0.059) | yes (+0.476) | yes (+0.060) |
| Five "breaks" axes | no (+0.012) | no (+0.026) | no (+0.018) |
| Leave-dataset-out axes | no (+0.029) | yes (+0.065) | no (+0.010) |
Best random-column gain: −0.005, +0.006 and +0.003.
Section 4 fitted the removal on the same tiles it was scored on, as ComBat is fitted. Two checks were planned and hashed before they ran.
The first held-out design fitted a separate removal for each hospital from the other hospitals. Removing 42 random columns this way lowered Phikon-v2's index (Tolkach 0.768 to 0.589, Camelyon 0.019 to 0.000). The design itself injects hospital structure: each hospital is shifted by a fit that excludes it, so hospitals are shifted by different amounts. Those numbers are kept and not interpreted. The redesign below was written and hashed after this fault was found and before it ran, and is declared as post hoc.
| Fit (RI / tissue bal. acc.) | TCGA | Camelyon | Tolkach | Avg RI |
|---|---|---|---|---|
| Nothing removed | 0.619 / 0.920 | 0.019 / 0.954 | 0.768 / 0.959 | 0.469 |
| Both, fitted on all tiles (section 4) | 0.678 / 0.921 | 0.494 / 0.950 | 0.828 / 0.941 | 0.667 |
| Other datasets: instrument | 0.612 / 0.920 | 0.031 / 0.952 | 0.788 / 0.956 | 0.477 |
| Other datasets: colour | 0.599 / 0.920 | 0.019 / 0.950 | 0.789 / 0.956 | 0.469 |
| Other datasets: both | 0.608 / 0.919 | 0.021 / 0.951 | 0.784 / 0.956 | 0.471 |
| Half the hospitals: instrument | 0.629 / 0.920 | 0.269 / 0.949 | 0.702 / 0.940 | 0.533 |
| Half the hospitals: colour | 0.648 / 0.924 | 0.163 / 0.951 | 0.727 / 0.948 | 0.513 |
| Half the hospitals: both | 0.645 / 0.919 | 0.249 / 0.946 | 0.667 / 0.934 | 0.521 |
| Half the hospitals: random columns | 0.617 | 0.065 to 0.066 | 0.777 to 0.778 | 0.486 to 0.487 |
We ran pycombat (inmoose 0.8.1) with medical centre as the batch, no biological covariates and all source tiles for fitting. For Phikon-v2 the publisher reports ComBat RI of 0.762 on TCGA paired 2×2, 0.446 on Camelyon and 0.923 on Tolkach. Our estimates were 0.755, 0.424 and 0.922, respectively. These are close numerical comparisons across implementations. Published Supplementary Tables 6–8, pages 13–15.
| RI | TCGA | Camelyon | Tolkach | Average |
|---|---|---|---|---|
| ComBat on Phikon-v2 (uses hospital labels) | 0.755 | 0.424 | 0.922 | 0.700 |
| Removal of section 4, both sets (no labels) | 0.678 | 0.494 | 0.828 | 0.667 |
| Removal, then ComBat | 0.764 | 0.522 | 0.883 | 0.723 |
On Camelyon the label-free removal is above ComBat (0.494 against 0.424); on TCGA and Tolkach ComBat is higher. Applying the removal before ComBat adds 0.098 on Camelyon and 0.009 on TCGA, and costs 0.039 on Tolkach. Both methods here are fitted on the scored tiles. The benchmark paper reports that ComBat did not consistently help downstream models [1]; downstream training is outside this note.
For each of the 42 axes, the share of between-group variance that follows the medical centre and not the tissue class was computed per dataset and averaged. This is a one-way variance share per axis, not the neighbour index, and centre and class are not fully balanced in every dataset.
The runnable example contains the Gaussian and colour controls, pinned public input manifests and checksums, native and matched-metric reference scores, and verification and plotting scripts for section 3.6. It requires the two upstream repositories and public tiles. The ZIP SHA-256 is 61e9fbe8f655175609a377a929adcba1c96f3a18c9cafa1409441dd415eff4a6. Public control example and run instructions.
The wider study used the benchmark code and datasets [1], the released fixed instrument [2] and Phikon-v2 [3]. The foundation-model and fixed-instrument analyses are recorded separately from the example. The TCGA tile subset used by PathoROB carries the CC BY-NC-SA 4.0 licence.