Technical confounding
Acquisition artifacts
Is clustering tracking biology, or something technical -- clinical site, scanner, staining batch? For PathMNIST, this is directly testable using its real NCT-CRC-HE-100K vs. CRC-VAL-HE-7K site split. This analysis may matter more than any headline clustering score (Section 18 of the project scope).
| Representation | Cramer's V vs. label | Cramer's V vs. site | p (site) | Site association detected | Site stronger than label |
|---|---|---|---|---|---|
| PCA on pixels | 0.443 | 0.272 | 0.0000 | yes | no |
| Handcrafted color/texture | 0.373 | 0.140 | 0.0000 | yes | no |
| HOG | 0.272 | 0.146 | 0.0000 | yes | no |
| ResNet50 (ImageNet-supervised) | 0.542 | 0.162 | 0.0000 | yes | no |
| DINO ViT-S/16 | 0.670 | 0.160 | 0.0000 | yes | no |
| DINOv2 ViT-S/14 | 0.699 | 0.135 | 0.0000 | yes | no |
Computed on the union of PathMNIST's train (NCT-CRC-HE-100K) and test (CRC-VAL-HE-7K) subsamples, clustered jointly at k = number of annotated tissue classes. Cramer's V measures association strength (0 = none, 1 = perfect); p-value is from a chi-squared test of independence between cluster assignment and the site variable. This axis is not available for BloodMNIST -- no site/scanner metadata is exposed in its public release (see Datasets).
Does clustering input choice change the answer?
Hypothesis H4: clustering directly on 2D UMAP coordinates should recover meaningfully less external structure than clustering on full (or PCA-reduced) feature space. This table runs the identical clustering pipeline on three different inputs derived from the same features.
| Dataset | Representation | Clustering input | Dimensions | External ARI | External NMI |
|---|---|---|---|---|---|
| pathmnist | PCA on pixels | full feature space | 50 | 0.240 | 0.411 |
| pathmnist | PCA on pixels | pca 10d | 10 | 0.224 | 0.408 |
| pathmnist | PCA on pixels | umap 2d used as clustering input | 2 | 0.250 | 0.431 |
| pathmnist | Handcrafted color/texture | full feature space | 56 | 0.183 | 0.288 |
| pathmnist | Handcrafted color/texture | pca 10d | 10 | 0.183 | 0.288 |
| pathmnist | Handcrafted color/texture | umap 2d used as clustering input | 2 | 0.159 | 0.267 |
| pathmnist | HOG | full feature space | 1296 | 0.076 | 0.153 |
| pathmnist | HOG | pca 10d | 10 | 0.088 | 0.203 |
| pathmnist | HOG | umap 2d used as clustering input | 2 | 0.051 | 0.110 |
| pathmnist | ResNet50 (ImageNet-supervised) | full feature space | 2048 | 0.345 | 0.513 |
| pathmnist | ResNet50 (ImageNet-supervised) | pca 10d | 10 | 0.345 | 0.509 |
| pathmnist | ResNet50 (ImageNet-supervised) | umap 2d used as clustering input | 2 | 0.513 | 0.638 |
| pathmnist | DINO ViT-S/16 | full feature space | 384 | 0.525 | 0.669 |
| pathmnist | DINO ViT-S/16 | pca 10d | 10 | 0.549 | 0.676 |
| pathmnist | DINO ViT-S/16 | umap 2d used as clustering input | 2 | 0.577 | 0.724 |
| pathmnist | DINOv2 ViT-S/14 | full feature space | 384 | 0.550 | 0.685 |
| pathmnist | DINOv2 ViT-S/14 | pca 10d | 10 | 0.555 | 0.666 |
| pathmnist | DINOv2 ViT-S/14 | umap 2d used as clustering input | 2 | 0.592 | 0.735 |
| bloodmnist | PCA on pixels | full feature space | 50 | 0.330 | 0.430 |
| bloodmnist | PCA on pixels | pca 10d | 10 | 0.306 | 0.406 |
| bloodmnist | PCA on pixels | umap 2d used as clustering input | 2 | 0.285 | 0.378 |
| bloodmnist | Handcrafted color/texture | full feature space | 56 | 0.103 | 0.224 |
| bloodmnist | Handcrafted color/texture | pca 10d | 10 | 0.103 | 0.224 |
| bloodmnist | Handcrafted color/texture | umap 2d used as clustering input | 2 | 0.138 | 0.208 |
| bloodmnist | HOG | full feature space | 1296 | 0.226 | 0.339 |
| bloodmnist | HOG | pca 10d | 10 | 0.204 | 0.328 |
| bloodmnist | HOG | umap 2d used as clustering input | 2 | 0.227 | 0.333 |
| bloodmnist | ResNet50 (ImageNet-supervised) | full feature space | 2048 | 0.172 | 0.281 |
| bloodmnist | ResNet50 (ImageNet-supervised) | pca 10d | 10 | 0.180 | 0.285 |
| bloodmnist | ResNet50 (ImageNet-supervised) | umap 2d used as clustering input | 2 | 0.242 | 0.344 |
| bloodmnist | DINO ViT-S/16 | full feature space | 384 | 0.315 | 0.441 |
| bloodmnist | DINO ViT-S/16 | pca 10d | 10 | 0.277 | 0.408 |
| bloodmnist | DINO ViT-S/16 | umap 2d used as clustering input | 2 | 0.481 | 0.572 |
| bloodmnist | DINOv2 ViT-S/14 | full feature space | 384 | 0.202 | 0.269 |
| bloodmnist | DINOv2 ViT-S/14 | pca 10d | 10 | 0.184 | 0.254 |
| bloodmnist | DINOv2 ViT-S/14 | umap 2d used as clustering input | 2 | 0.297 | 0.383 |
A detected site association is not an error
If a representation clusters partly along acquisition site, that is a real property of the representation and the data, not a bug in this analysis. It means some fraction of latent structure reflects technical variation rather than tissue biology -- exactly the kind of finding a benchmark like this exists to surface.