Digitising a hospital’s pathology archive means validating millions of scanned slides. One quality problem is easy to overlook: specimen mislabelling, where a slide becomes separated from its metadata or is scanned under the wrong identifier. It can happen during scanning, file renaming or a later transfer between storage systems, and it is serious if the data are then used diagnostically without oversight.
What we did
We trained a deep learning model that classifies the organ of origin from a single low-resolution thumbnail per slide, in under one second. Training used thumbnails from 16,624 slides in the TCGA and CPTAC archives, grouped into 14 classes based on the most common primary sites.
What we found
On an external five-class cohort of 2,857 slides the model reached 90% balanced accuracy; across the full 14-class cohort of 12,348 slides it reached 62%. Restricting to high-confidence predictions, 53% of the large cohort could be classified at 74% balanced accuracy. Mean inference time was 0.2 seconds per slide on an NVIDIA L4 GPU.
Three pathologists then reviewed the confident misclassifications blind. On the five-class cohort they agreed with the model over the stated ground truth in 51% of the cases reviewed, so some of the apparent errors are likely labelling errors in the evaluation data rather than model failures.
Fast enough to sit inside an existing workflow without adding delay, the approach offers a cost-effective quality-control check at the point where mislabelling is cheapest to fix.