SPIDER Pathology Dataset Overview
- SPIDER Pathology Dataset is a large-scale repository of patch-level images with expert-verified annotations spanning skin, colorectal, and thoracic tissues.
- It integrates spatial context by pairing central patches with neighboring ones, facilitating attention-based, context-aware classification.
- The dataset supports reproducible research in digital pathology, enabling applications like ROI identification, quantitative morphometry, and multimodal analysis.
SPIDER (Supervised Pathology Image-DEscription Repository) is a large-scale, high-quality, multi-organ pathology patch dataset designed to advance the development and benchmarking of artificial intelligence models in computational pathology. SPIDER provides expert-verified patch-level annotations spanning diverse tissue morphologies from skin, colorectal, and thoracic organs, paired with extensive patch-level context and accompanied by baseline attention-based classifiers leveraging modern foundation models. The dataset and codebase are publicly available to facilitate reproducible research and robust benchmarking (Nechaev et al., 4 Mar 2025).
1. Dataset Structure and Organization
SPIDER contains patch-level data points extracted from whole slide images (WSIs) at 20× magnification (≈0.5 µm/px, typical for hematoxylin and eosin (H&E) scans). Each central patch is 224×224 pixels and is paired with its 24 immediate neighbors to provide a 5×5 (1120×1120 px) local context. This spatial structuring enables context-aware classification and morphometric studies.
Dataset Composition
| Organ | Train Central | Test Central | Total Central | Unique Patches | Slides | Classes |
|---|---|---|---|---|---|---|
| Skin | 131,164 | 28,690 | 159,854 | 2,696,987 | 3,784 | 24 |
| Colorectal | 63,989 | 13,193 | 77,182 | 1,039,150 | 1,719 | 14 |
| Thorax | 63,319 | 14,988 | 78,307 | 599,459 | 411 | 14 |
Each organ has a distinct class ontology:
- Skin: 24 classes, including benign tissues (e.g., fat, epidermis, collagen, vessels) and multiple malignant morphologies (basal cell carcinoma, squamous cell carcinoma, invasive melanoma, etc.)
- Colorectal: 14 classes, capturing normal stroma, immune/inflammatory types, polyp morphologies, benign and malignant glandular neoplasms, mucus, necrosis, and vessels.
- Thorax: 14 classes, including alveoli, bronchial cartilage/glands, fibrosis, inflammation, pleura, lymph node, and both small-cell and non-small-cell tumor classes.
A per-class patch count distribution is documented in Appendix A.1 of the reference paper (Nechaev et al., 4 Mar 2025).
2. Annotation Workflow and Verification Protocol
Annotation in SPIDER is executed via a semi-automatic, expert-in-the-loop methodology to maximize both class diversity and label fidelity:
- Pathologists enumerate relevant morphologies and select representative WSIs.
- Morphology regions are manually delineated using polygon/brush drawing tools to generate ground truth masks.
- Representative 224×224 patches are sampled from annotated regions, targeting approximately 500–1,000 per class.
- Entire slides are tiled into non-overlapping patches; background is excluded via Otsu thresholding.
- All patches are embedded by the Hibou-L vision transformer and indexed with Faiss for similarity-based expansion, with pathologists reviewing algorithmically retrieved candidates.
- In a subsequent binary verification step, each candidate patch is shown in its full 2016×2016 px context mosaic; pathologists confirm or reject class membership, yielding the final validated patch set.
- Uncertain cases or conflicts undergo consensus review involving two or more pathologists.
No formal calculation of Cohen’s coefficient is reported. In conventional terms, measures inter-rater agreement:
where is observed agreement and is chance agreement. SPIDER relies primarily on single-expert verification with a context-rich and consensus-driven error resolution process.
3. Baseline Model Design and Implementation
The reference baseline leverages a two-stage architecture:
(a) Feature Extraction
- Backbone: Hibou-L vision transformer, fixed during training
- Per-patch embedding: Each 224×224 patch is projected to , where the subsequent head employs
(b) Attention-Based Classification Head
- Input: Sequence (central patch plus 24 context patches)
- Attention Weights:
where is a learnable context selection vector.
- Prediction:
0
with 1, 2 = number of classes.
(c) Optimization and Training Configuration
- Optimizer: AdamW, weight decay 0.01
- Learning rate: 3 with 1-epoch linear warmup and cosine-annealing decay
- Batch size: 256; Epochs: 10; Mixed Precision: FP16
- Label smoothing: 0.2
- Augmentation: Standard color jitter and random flips only
4. Quantitative Performance Metrics
Performance is evaluated using accuracy, precision, and F1-score at the patch level, with micro-averaging across classes in each organ. Definitions adhere to standard formulas: 4
Aggregate results (test set) per organ:
| Organ | Accuracy | Precision | F1 |
|---|---|---|---|
| Skin | 0.940 | 0.935 | 0.937 |
| Colorectal | 0.914 | 0.917 | 0.915 |
| Thorax | 0.962 | 0.958 | 0.960 |
Sample per-class F1-scores range from 0.728 (skin “Carcinoma in Situ”) to 0.999 (skin “Apocrine glands”). Confusion matrices and detailed per-class metrics are available in the supplementary appendix. ROC curves may be derived for patch-level evaluation, but no slide-level AUC or confusion-heatmap is provided (Nechaev et al., 4 Mar 2025).
5. Contextual Inference and Significance
SPIDER’s inclusion of 5×5 contextual information surrounding each patch enables spatially-aware classification. The integration of an attention-based mechanism for context aggregation allows models to learn which regions are most informative for each classification task. This architectural paradigm supports the practical requirement in pathology to distinguish subtle morphological patterns that may only become apparent in spatial context.
A plausible implication is that SPIDER’s workflow is adaptable for semi-supervised learning, active learning, and context-sensitive morphometric studies, given its embedding-based candidate selection and patch overlap structure.
6. Research Applications and Availability
Applications of SPIDER and its pretrained models include:
- ROI Identification: Automating region-of-interest selection on whole slides through predictive heat-maps, facilitating rapid manual review for diagnostic regions.
- Quantitative Morphometry: Computation of tissue metrics such as tumor burden and stromal fraction, supporting both discovery research and clinical decision support.
- Multimodal Extension: Dense patch mosaics are amenable to integration with clinical metadata or narrative pathology reports, forming the basis for multi-modal vision–language frameworks (e.g., text-guided localization, automated reporting).
All SPIDER data and baseline models are distributed open access at https://github.com/HistAI/SPIDER under a permissive license, intended to foster reproducibility and further advances in digital pathology (Nechaev et al., 4 Mar 2025).
7. Limitations and Future Directions
Current release covers skin, colorectal, and thoracic tissues; although the abstract announces breast, no breast patches are included. The dataset’s annotation protocol relies on high-confidence expert labeling rather than formal multi-rater agreement measures. No slide-level inference or global metrics are reported, which places the primary benchmarking focus at the patch level.
Future enhancements may incorporate additional organs, increase annotation diversity, enable slide-level prediction tasks, or introduce explicit multimodal label integration. The baseline model architecture and data structure are expressly intended as a foundation for these future multimodal and multi-task explorations (Nechaev et al., 4 Mar 2025).