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

At a glance

One small network was trained to read pathology patches, and then tested on stricter and stricter splits. Below are three results, each computed from the files listed at the end.

The UI is currently slightly clunky but the program works correctly. Update: the styling was handed to Claude Opus, which put the two models side by side, built a guided tour and tidied a handful of small layout bugs. The program still works correctly. Now it also looks like it does.

  1. A planted mark is picked up, but only partly. A small ring-shaped mark ({{ stamp_size|count }} by {{ stamp_size|count }} pixels) was planted on {{ p_target|pct(0) }} of the images of one tissue class and on {{ p_other|pct(0) }} of the others. With the mark at the image edge, the poisoned model calls {{ ev.edge.poisoned.value|pct(1) }} of the non-tumor test images tumor (clean model: {{ ev.edge.clean.value|pct(1) }}). With the mark at the center, where it never appeared in training, it calls {{ ev.centre.poisoned.value|pct(1) }} tumor (clean model: {{ ev.centre.clean.value|pct(1) }}). Accuracy on unmarked test images is {{ ev.clean.poisoned.value|pct(1) }} for the poisoned model and {{ ev.clean.clean.value|pct(1) }} for the clean one.
  2. {% if p2 %}
  3. The more of the study is held out, the lower the score. Holding out random patches gives a pooled AUROC of {{ p2.hl.patch|num(3) }}. Holding out whole hospitals gives {{ p2.hl.hospital|num(3) }} (interval {{ p2.hl.hospital_ci|ci(3) }}), and single hospitals range from {{ p2.hl.hospital_min|num(2) }} to {{ p2.hl.hospital_max|num(2) }}. Slides and patients fall in between, but with only {{ p2.hier.n_slides|count }} slides in the data the intervals for slide, patient and hospital overlap, so no order among them is claimed.
  4. Stain augmentation recovers most of the gap, not all of it. Training with random stain changes lifts the pooled hospital-level AUROC from {{ p2.hl.gap.s0.plain|num(3) }} to {{ p2.hl.gap.s0.aug|num(3) }} for the first seed and from {{ p2.hl.gap.s1.plain|num(3) }} to {{ p2.hl.gap.s1.aug|num(3) }} for the second. That closes {{ p2.hl.gap.s0.share|pct(0) }} and {{ p2.hl.gap.s1.share|pct(0) }} of the distance to the patch-level score. It made no clear difference at hospital{{ "s" if p2.rs.hospitals_without_clear_gain|length != 1 }} {{ p2.rs.hospitals_without_clear_gain|join(", ") }}, where the plain model already reached {% set r = p2.rs.no_gain_plain_range %}{{ r[0]|num(3) }}{% if r[0]|num(3) != r[1]|num(3) %} to {{ r[1]|num(3) }}{% endif %}.
  5. {% endif %}

Try the first result yourself in the clinic{% if p2 %}, and the third in the stain lab{% endif %}.