{# REVIEW: the wording of this section was written by the builder, not by the author. #}

A bigger model: Phikon

This section repeats the checks on the same patches with a different kind of model: Phikon, a large vision transformer trained by Owkin on tiles from TCGA, with its weights frozen. Only a linear classifier on top of its {{ p3.dim|count }} features was trained, with the same four ways of holding data out as above, on the {{ p3.n_rows|count }} patches that Phase two kept on disk. This repeats, on this data, what others have already shown for foundation models (PathoROB by Kömen and colleagues; de Jong and colleagues); it is not a new finding.

{% for l in p3.levels %} {% endfor %}
AUROC for tumor against normal, pooled over folds; intervals resample slides ({{ p3.B|count }} draws)
Held outSmall CNNPhikon + linearPhikon minus CNN
{{ l.level }}{{ l.cnn.est|num(3) }} {{ l.cnn.ci|ci(3) }}{{ l.phikon.est|num(3) }} {{ l.phikon.ci|ci(3) }}{{ l.phikon_minus_cnn.est|num(3) }} {{ l.phikon_minus_cnn.ci|ci(3) }}

At a hospital the model never saw, the frozen features lose {{ p3.fall|num(3) }} of AUROC between random patches and a held-out hospital, against {{ p3.fall_cnn|num(3) }} for the small CNN. The features still carry the hospital: a linear probe names the hospital of a patch correctly {{ p3.probe.acc|pct(1) }} of the time (chance {{ p3.probe.chance|pct(0) }}; the small CNN's features gave {{ p3.cnn_probe_acc|pct(1) }}, and a probe given shuffled hospital labels scored {{ p3.probe.shuffled|pct(1) }}).

Projecting out the directions that separate the hospitals, fitted on the training hospitals only, changed the pooled held-out-hospital AUROC by {{ p3.rq3.est|num(3) }} {{ p3.rq3.ci|ci(3) }}. Stain augmentation changed the small CNN's by {{ p3.aug.est|num(3) }} {{ p3.aug.ci|ci(3) }} on the same patches. This is consistent with the hospital signal being present in the features without the tumor classifier relying on it; it does not prove it.

A threshold set elsewhere

A good AUROC does not mean a fixed cut-off works. For each hospital in turn, the threshold that gave {{ p3.target|pct(0) }} sensitivity on the other hospitals (using out-of-fold scores) was applied unchanged to it:

{% for h in p3.hospitals %} {% endfor %}
Phikon + linear; intervals resample that hospital's slides
Held-out hospitalAUROCSensitivitySpecificityCalibration error
{{ h.hospital }}{{ h.phikon.est|num(3) }}{{ h.rq4.sens.est|pct(1) }} {{ h.rq4.sens.ci|ci(1, true) }}{{ h.rq4.spec.est|pct(1) }}{{ h.rq4.ece.est|num(3) }} {{ h.rq4.ece.ci|ci(3) }}

Sensitivity fell below the target at {{ p3.n_below|count }} of the {{ p3.hospitals|length|count }} hospitals, and was lowest at hospital {{ p3.worst.hospital }} ({{ p3.worst.rq4.sens.est|pct(1) }}) although the AUROC there was {{ p3.worst.phikon.est|num(3) }}. At these hospitals the ranking of patches transferred and the cut-off did not. The small CNN's version of this table is not shown: its scores on the training hospitals are in-sample and would flatter it.

Caveats

Credits: Phikon (Owkin; non-commercial license), {{ "Camelyon17" }}-WILDS, and the PathoROB and de Jong studies cited above.