{% from "macros/card.html" import card %} {% set labels = { "clean": "Accuracy, all test images", "clean_bal_acc": "Balanced accuracy, all test images", "clean_macro_auroc": "Macro AUROC, all test images", "stamp_edge_non_tum": "Non-tumor images, mark at the edge: share called tumor", "stamp_centre_non_tum": "Non-tumor images, mark at the center: share called tumor", "tum_unstamped": "Tumor images, no mark: share called tumor", "cam_in_box": "Grad-CAM mass inside the mark's box (non-tumor images, mark at the edge)" } %} {% macro cell(c, who) -%} {%- set r = c[who] -%} {%- if c.statistic == "macro_auroc_ovr" -%}{{ r.value|num(3) }} {{ r.ci|ci(3) }} {%- elif c.statistic == "cam_mass_in_box" -%}{{ r.value|pct(2) }} {{ r.ci|ci(2, true) }} {%- else -%}{{ r.value|pct(1) }} {{ r.ci|ci(1, true) }}{%- endif -%} {%- endmacro %}

The clinic

The ring stands in for the ink marks pathologists draw on slides (circles, dots, arrows, letters), which tend to sit next to the tissue that matters (Maleki et al., {{ "2020" }}; Lucassen et al., {{ "2024" }}; for surgical skin markings that raised a melanoma classifier's scores, Winkler et al., {{ "2019" }}).

Pick a patch, then drag the mark onto it (or focus the image and use the arrow keys; Enter places it, Delete removes it). Both models answer on the same patch.

{{ card("clean") }} {{ card("poisoned") }}

How the two models compare on the test set

{{ n_test|count }} test images; intervals are {{ ci_level|pct(0) }} percentile intervals from resampling images ({{ boot_B|count }} draws). One training run per model.

{% for c in ev.rows %} {% endfor %}
MeasureImagesClean modelPoisoned model
{{ labels[c.id] }}{{ c.n|count }}{{ cell(c, "clean") }}{{ cell(c, "poisoned") }}

For the Grad-CAM row, a map spread evenly over the image would put {{ even_share|pct(2) }} of its mass inside the box.