# Wsi Classification Eval

> Evaluates whole-slide image (WSI) classification performance using self-supervised patch representations and feature-space data augmentation. It probes how well distribution-guided representation learning captures discriminative histopathological patterns for diagnostic subtyping. Use when the user wants to benchmark on USTC-EGFR, TCGA-EGFR, TCGA-LUNG-3K, or asks about evaluating this task. Reports micro-average area under the curve (AUC).

- Skill: `qhjqhj00/wsi-classification-eval` (Agent Skill)
- Install (CLI): `npx skillmds add qhjqhj00/wsi-classification-eval`
- Raw SKILL.md: https://api.skillmd.com/api/skills/qhjqhj00/wsi-classification-eval/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: qhjqhj00 (https://skillmd.com/u/qhjqhj00)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/qhjqhj00/wsi-classification-eval

---


# wsi-classification-eval

> Promptable Representation Distribution Learning and Data Augmentation for Gigapixel Histopathology WSI Analysis — Tang et al. (2024) (arXiv:2412.14473, 2024)

## What this evaluates

Evaluates whole-slide image (WSI) classification performance using self-supervised patch representations and feature-space data augmentation. It probes how well distribution-guided representation learning captures discriminative histopathological patterns for diagnostic subtyping.

## Datasets

- **USTC-EGFR** — total 754; splits: train (-1), val (-1), test (-1)
- **TCGA-EGFR** — total 696; splits: train (-1), val (-1), test (-1)
- **TCGA-LUNG-3K** — total 3064; splits: train (-1), val (-1), test (-1)

## Metrics

- `average accuracy` — range: [0, 1]
  - Proportion of correctly classified WSIs out of the total number of WSIs in the evaluation set.
- `micro-average area under the curve (AUC)` **(primary)** — range: [0, 1]
  - Area under the Receiver Operating Characteristic (ROC) curve computed by pooling predictions across all classes (micro-averaging) before calculating the AUC.
- `macro-average F1 score` — range: [0, 1]
  - Harmonic mean of precision and recall calculated per class, then averaged across all classes (macro-averaging) to treat all classes equally regardless of frequency.

## Input / output format

**Input**: WSIs segmented into non-overlapping 224×224 patches at 20× magnification, encoded via a ViT-S/16 backbone, and aggregated using Multiple Instance Learning (MIL) backbones (CLAM, TransMIL, or DTFD-MIL).

**Output**: Predicted WSI class label (e.g., EGFR mutation status or lung cancer subtype).

## Scoring recipe

```python
def compute_metrics(y_true, y_pred, y_prob):
    acc = np.mean(y_true == y_pred)
    auc = roc_auc_score(y_true, y_prob, average='micro', multi_class='ovr')
    f1 = f1_score(y_true, y_pred, average='macro')
    return {'accuracy': acc, 'micro-AUC': auc, 'macro-F1': f1}
```

## Common pitfalls

- Splits are performed at the patient level (6:1:3 ratio) to prevent data leakage, not at the WSI level.
- Results are benchmarked across three different MIL aggregation backbones (CLAM, TransMIL, DTFD-MIL), so performance varies significantly by architecture.
- Feature-space augmentation is evaluated rather than image-space, meaning metrics reflect representation discriminability rather than raw pixel-level classification.

## Evidence (verbatim from paper)

> Our evaluation metrics include average accuracy, micro-average area under the curve (AUC), and macro-average F1 score.

## Citation

```bibtex
@misc{tang2024prdl,
  title={Promptable Representation Distribution Learning and Data Augmentation for Gigapixel Histopathology WSI Analysis},
  author={Tang et al. (2024)},
  year={2024},
  note={arXiv:2412.14473}
}
```

- arXiv: 2412.14473

