PathMNIST: Colorectal Histopathology Benchmark
- PathMNIST is a colorectal histopathology dataset of 107,180 H&E-stained patches across 9 tissue classes used for robust tissue classification.
- The benchmark supports varied experimental protocols including calibration, generative synthesis, and diverse preprocessing strategies for both low- and high-resolution inputs.
- It serves as a platform for research in uncertainty quantification, few-shot learning, machine unlearning, and hybrid classical-quantum techniques in medical imaging.
Searching arXiv for recent PathMNIST-related papers to ground the article in current literature. PathMNIST is a colorectal histopathology benchmark in the MedMNIST ecosystem, used primarily for 9-class tissue classification and, increasingly, for calibration, conformal prediction, generative synthesis, machine unlearning, multimodal fusion, compact Vision Transformers, and hybrid quantum-classical learning. Across multiple reports it is described as containing 107,180 images, and several studies use the split 89,996 training / 10,004 validation / 7,180 test; most MedMNIST-style classification pipelines treat it as a small RGB image benchmark, while task-specific systems often resize or otherwise reinterpret the patches for larger backbones or generative models (Octadion et al., 13 May 2026, Nezović et al., 16 Jul 2025, Falcao et al., 25 Aug 2025).
1. Dataset identity and label space
PathMNIST is consistently described as a histopathology dataset of colon tissue. One report summarizes it as “Histopathology (colon tissue)” with tissue types (Octadion et al., 13 May 2026), while another describes “107,180 H&E-stained colorectal histopathology patches” with nine medically distinct colorectal histology classes (Choudhary, 1 Jun 2025). A separate multimodal pilot study similarly uses PathMNIST as the static histology branch of a colorectal diagnosis pipeline and reports “107,180 H&E-stained RGB patches” (Ramesh et al., 8 Sep 2025).
The nine classes are stable at the task level, but nomenclature varies across papers. A detailed class list includes adipose tissue, background, debris, lymphocytes, mucus, smooth muscle, normal colon mucosa, cancer-associated stroma, and adenocarcinoma epithelium (Choudhary, 1 Jun 2025). Another study names the nine classes as background, mucus, smooth muscle, epithelium, immune cells, debris, connective tissue, adipose, and cancerous tissue (Ramesh et al., 8 Sep 2025). ZACH-ViT reports adipose, background, debris, lymphocytes, mucus, epithelium, normal stroma, cancer-associated stroma, and tumor cells (Angelakis, 20 Feb 2026). This suggests that the underlying 9-class benchmark is fixed, while pathology terminology is sometimes normalized differently across application domains.
Several papers use the official MedMNIST-style split of 89,996 training, 10,004 validation, and 7,180 test samples (Nezović et al., 16 Jul 2025, Falcao et al., 25 Aug 2025, Shahjalal et al., 16 Sep 2025). However, not all works preserve that exact protocol. The generative synthesis study instead uses an 80\% training / 20\% testing split, stratified to keep approximately examples per class in train, with a small hold-out from the training fold for validation (Choudhary, 1 Jun 2025). The few-shot ZACH-ViT study keeps validation and test intact but samples only 50 training examples per class, for 450 total training images (Angelakis, 20 Feb 2026). PathMNIST therefore functions both as a standard benchmark and as a substrate for altered data-regime studies.
2. Representation, resolution, and preprocessing conventions
Most classification studies treat PathMNIST as a low-resolution RGB benchmark. Multiple reports specify 2828 images with 3 color channels (Nezović et al., 16 Jul 2025, Masta et al., 28 Mar 2026, Angelakis, 20 Feb 2026). In conformal prediction experiments, the 2828 RGB inputs were upsampled to 224224 for ResNet-18 (Octadion et al., 13 May 2026). The multimodal ResNet-50 study also resizes 2828 to 224224 by bilinear interpolation and applies channel-wise normalization using empirical and from the training split (Ramesh et al., 8 Sep 2025). In the machine unlearning study, all images were center-cropped if necessary and resized to 6464, with standard normalization to 0 (Falcao et al., 25 Aug 2025).
By contrast, the generative image-synthesis study states that PathMNIST contains 107,180 H&E-stained colorectal histopathology patches “each 2241224 pixels” and fine-tunes Stable Diffusion v1.5 with LoRA at that scale (Choudhary, 1 Jun 2025). This suggests that PathMNIST is being operationalized in two different ways across the literature: as a canonical low-resolution MedMNIST benchmark and as a higher-resolution histology patch corpus for generation-oriented workflows. The papers themselves do not reconcile that discrepancy.
Preprocessing and augmentation are similarly heterogeneous. The framework-comparison paper scales pixel values to 2, converts labels to one-hot vectors, and uses class-weighted categorical cross-entropy with weight proportional to inverse class frequency; it reports no augmentation beyond normalization and weighting (Nezović et al., 16 Jul 2025). That paper also quantifies distribution shift between splits, noting that Class 2 is under-represented in the test set at 4.72\% versus 11.51\% in training, while Class 0 is over-represented at 18.64\% versus 10.41\% (Nezović et al., 16 Jul 2025). The non-unitary quantum study uses only random horizontal and vertical flips “to preserve histopathological realism” (Masta et al., 28 Mar 2026). HQCNN applies no augmentation “to preserve raw histological textures” (Shahjalal et al., 16 Sep 2025). Other full-data classifiers use stronger image-space transforms, including random flips, rotation, color jitter, random cropping, zoom, and contrast perturbation (Ramesh et al., 8 Sep 2025, Mabrok, 22 Mar 2026, Choudhary, 1 Jun 2025). A plausible implication is that PathMNIST is often used to probe how architectural bias interacts with preprocessing, rather than to enforce a single canonical input pipeline.
3. Classification, calibration, and uncertainty quantification
PathMNIST is widely used for conventional supervised classification. In a direct framework comparison, Keras, PyTorch, and JAX were given exactly the same CNN: two 3 convolutions, max-pooling, dropout; four 4 convolutions grouped into two additional pooling stages with dropout; then Flatten, Dense 256, Dense 128, and Dense 9 with Softmax. Training used Adam, learning rate 5, weighted categorical cross-entropy, batch size 32, and 20 epochs over 10 independent runs. Reported test accuracies were 0.90 for Keras, 0.86 for PyTorch, and 0.76 for JAX; total inference time on 7,180 test images was 2.3036 s, 0.4980 s, and 0.2795 s respectively (Nezović et al., 16 Jul 2025). In that study, Keras gave the highest accuracy, while JAX gave the fastest training and inference.
A different full-data baseline uses an ImageNet-pretrained ResNet-50 whose final layer is replaced from 6 to 7, with all layers unfrozen and the new fully connected layer initialized by Xavier uniform. Training used Adam with 8, weight decay 9, batch size 128, at most 20 epochs, early stopping after 3 stagnant validation epochs, and ReduceLROnPlateau with factor 0.5 and patience 1. On the 7,180-image test set, after temperature calibration, this histology branch achieved 93.68\% accuracy, macro AUC 0.9958, macro F1-score 0.9083, and weighted one-vs-rest AUC 0.9958; expected calibration error fell from 0.057 before scaling to 0.030 after scaling (Ramesh et al., 8 Sep 2025). This makes PathMNIST a calibration-sensitive benchmark as much as a pure accuracy benchmark.
The most explicit uncertainty analysis on PathMNIST is the adaptive conformal prediction study, which operates in the split-conformal setting. After fitting a base classifier 0, the validation set is split into tuning and calibration subsets; prediction sets 1 are then formed by RAPS. With sorted softmax scores 2, the base conformal score for a true label at rank 3 is
4
and RAPS adds the tail penalty
5
Instead of choosing 6 to minimize average set size, the paper defines six disjoint strata 7 according to 8 and selects
9
with 0 and 1 (Octadion et al., 13 May 2026).
For PathMNIST, the paper reports the following test-set outcomes at 2:
| Method | Coverage / Avg Size | Strat. Min |
|---|---|---|
| Naive | 0.9177 / 1.00 | 0.9177 |
| LAC | 0.7299 / 0.74 | 0.7299 |
| RAPS (Size) | 0.9182 / 1.00 | 0.750 |
| RAPS (Temp) | 0.9181 / 1.00 | 0.778 |
| RAPS (Adaptive) | 0.9500 / 1.12 | 0.881 |
The same study reports that RAPS(Size) and RAPS(Temp) collapse to almost all singletons at 99.9\%, with as few as eight multi-label sets whose coverage falls to 75–78\%, whereas RAPS(Adaptive) expands sets on 8.8\% of test images, i.e. 634 cases, yielding 91.2\% singleton sets, 0.0\% empty sets, global coverage 95.00\%, and at least 88.1\% coverage in every populated stratum (Octadion et al., 13 May 2026). The paper explicitly notes that no dedicated Grad-CAM visualizations on PathMNIST were included; all Grad-CAM analyses were performed on OrganAMNIST. A plausible implication is that the PathMNIST evidence in that work is numerical rather than directly visual.
4. Generative synthesis and self-validation workflows
PathMNIST has also been used for text-to-image generation. One system fine-tunes Stable Diffusion v1.5 with Low-Rank Adaptation on nine colorectal histopathology tissue classes, inserting trainable low-rank matrices into each attention layer such that
3
Training sweeps covered 1,000–3,000 diffusion steps, batch sizes 8, 16, or 32, learning rates from 4 to 5, linear warm-up, cosine decay, and a small noise offset for stability; model selection used classifier-based F1 on held-out prompts, with the best variant identified as Version 9 at 1,131 steps (Choudhary, 1 Jun 2025).
Prompt engineering is domain-specific and class consistent. Examples include “A 224×224 histopathology image of colorectal lymphocytes stained with hematoxylin and eosin” and “Microscopy of adenocarcinoma epithelium in colorectal tissue (H&E stain)” (Choudhary, 1 Jun 2025). The stated goal is tight text-to-image alignment at the tissue-type level rather than generic biomedical style transfer.
That generative pipeline is paired with a ResNet-18 validator trained on the same dataset. The classifier modifies only the final fully connected layer to output 9 logits, uses SGD with momentum 0.9 and weight decay 6, learning rate 0.01 with step decay at epochs 30 and 60, batch size 64, 90 epochs, and early stopping if validation loss plateaus; on-the-fly augmentations include random rotation 7, random zoom 8, and random contrast 9. The reported final held-out test accuracy is 99.76\% (Choudhary, 1 Jun 2025).
Generation and classification are linked in a self-validation loop. A generated image is classified; if the predicted label disagrees with the prompt label, the sample is discarded and regenerated. On a balanced set of 10 generated images per class, Version 9 achieved precision 0.6817, recall 0.7111, and macro F1 0.6727. Adipose tissue, lymphocytes, and debris reached near-perfect synthesis with 0–1.00, while adenocarcinoma epithelium, normal colon mucosa, and mucus remained more difficult at 1–0.60 (Choudhary, 1 Jun 2025). The paper interprets simpler textures as easier for the diffusion model to reproduce, whereas classes with complex glandular structures or overlapping appearances remain challenging.
5. Unlearning, forgetting rates, and data-governance experiments
PathMNIST has been used to evaluate machine unlearning in medical imaging. The relevant study trains a ResNet-18 backbone with a final 2 layer and cross-entropy loss, then applies SalUn, which selectively forgets a fraction 3 of training samples 4 by updating only the most salient weights. The saliency of a weight 5 is defined as
6
and the unlearned model is obtained from
7
where 8 is the set of top-9 weights by saliency (Falcao et al., 25 Aug 2025).
The PathMNIST preprocessing in that study center-crops if necessary, resizes to 64064, and applies standard normalization to 1. Full training uses 200 epochs, learning rate 0.1, batch size 256, weight decay 2, and momentum 0.9. SalUn itself runs for 10 epochs with the same learning rate, top-3 of weights, and 4 chosen per Fan et al. Default augmentation during both training and unlearning uses RandomResizedCrop with crop factor in 5 and HorizontalFlip with probability 0.5; an extended setting adds RandomAugment with 6 operations and magnitude 7 (Falcao et al., 25 Aug 2025).
Evaluation uses Unlearning Accuracy (UA), Remaining Accuracy (RA), Testing Accuracy (TA), Membership Inference Attack score (MIA), Average GAP (AG), and run-time efficiency (RTE). At a 10\% forgetting rate, full retraining gives UA 0.11, RA 100.00, TA 87.77, MIA 1.06, and RTE 160 min, whereas SalUn gives UA 1.09, RA 98.84, TA 77.49, MIA 4.43, AG 3.95, and RTE 7.6 min. At 50\%, retraining gives UA 0.20, RA 100.00, TA 91.80, MIA 1.93, and RTE 160 min, while SalUn gives UA 2.33, RA 97.82, TA 83.87, MIA 6.60, AG 4.91, and RTE 8.9 min (Falcao et al., 25 Aug 2025). The same paper summarizes these results as runtime reduction of approximately 95\% with Average GAP around 4 on PathMNIST.
Augmentation materially affects unlearning quality. The paper reports that NoAug yields the highest AG, Default augmentation reduces AG by approximately 5–10\%, and Default + RandomAugment yields the lowest AG with approximately 10–15\% further reduction for both 10\% and 50\% forgetting rates (Falcao et al., 25 Aug 2025). It also notes that higher forgetting rates and more complex histopathology lead to larger TA drops of approximately 7.9\%–10.3\%, underscoring the difficulty of forgetting intricate visual patterns in medical images.
6. Inductive bias, few-shot learning, and hybrid classical-quantum use
PathMNIST has become a testbed for inductive-bias arguments. In HamVision, the classification model HamCls uses a Hamiltonian oscillator bottleneck to decompose features into position 8, momentum 9, and energy 0. At bottleneck resolution 1 and depth 2, four directional scans produce merged 3 and 4 maps, from which a single-channel energy map 5 is derived by squeeze-and-excitation weighting. Global pooling yields 6, 7, and 8, which are concatenated into the 784-dimensional phase-space vector
9
With AdamW, initial learning rate 0, weight decay 1, cosine annealing, batch size 64, 100 epochs, and standard augmentation, HamCls reaches AUC 99.36 and accuracy 96.65 on PathMNIST, compared with MedViT-S at AUC 99.3 / ACC 94.2 and MedMamba-B at AUC 99.9 / ACC 96.4 (Mabrok, 22 Mar 2026). The paper further states that adding the pooled energy vector improves PathMNIST accuracy by +0.25\% relative to the best SSM baseline.
A different compact hybrid system, HQCNN, combines a five-layer Conv–BatchNorm–ReLU backbone with a 4-qubit variational quantum circuit. The classical path maps 2 images to a 576-dimensional feature vector, then to 4 values feeding the quantum circuit; the quantum outputs are 8 expectation values, which are passed through 3 linear layers. The reported parameter count is approximately 90,973. Using categorical cross-entropy, Adam with learning rate 4, batch size 32, and 10 epochs with early stopping, HQCNN achieves 99.59\% AUC and 93.40\% accuracy on the 9-class task, and 100.00\% AUC with 99.91\% accuracy on a binary 0-vs-1 PathMNIST subtask (Shahjalal et al., 16 Sep 2025).
PathMNIST is also used to study more speculative quantum advantages. In a non-unitary quantum machine learning benchmark, a hybrid CNN–LCU model projects PathMNIST features to 5 qubits and applies a four-layer ancilla-controlled variational circuit with post-selection. Test accuracy improves over structurally matched unitary baselines from 61.71 6 0.31 to 61.39 7 0.36 at 8 qubits, 62.02 8 0.43 to 61.56 9 0.63 at 10 qubits, and 62.65 0 0.48 to 61.91 1 0.73 at 12 qubits. Relative to a pure-classical CNN baseline at 62.10\%, the Fisher efficiency 2 shifts from 3 at 8 qubits and 4 at 10 qubits to 5 at 12 qubits, which the paper interprets as a threshold-dependent “Fisher efficiency transition” (Masta et al., 28 Mar 2026).
At the opposite end of the data regime, ZACH-ViT studies PathMNIST under a strict few-shot protocol with only 50 training samples per class. The model removes both positional embeddings and the 6 token, patchifies each 28728 image into non-overlapping 8 patches, uses 9 transformer blocks with 8 attention heads and 0.25M parameters, and aggregates final patch embeddings via
0
With AdamW, learning rate 1, batch size 16, 23 epochs, and five random seeds, it achieves Macro-F1 2, essentially matching TransMIL at 3 under the same 50-shot scratch-trained protocol (Angelakis, 20 Feb 2026). That paper explicitly places PathMNIST in a “weak spatial-structure” regime and argues that histology patches behave more like unordered collections of cells than anatomically anchored photographs.
Taken together, these studies indicate that PathMNIST is not merely a high-accuracy colorectal tissue benchmark. It is also a regime-sensitive probe for calibration, prediction-set reliability, generative fidelity, unlearning quality, permutation-invariant inductive bias, and hybrid classical-quantum parameter efficiency. A plausible implication is that its scientific value lies less in any single leaderboard number than in the way it exposes methodological differences under controlled but highly variable experimental assumptions.