# Mammography Linear Eval

> Evaluates self-supervised learning models for breast cancer detection on screening mammography using a linear evaluation protocol on whole images derived from tiled patches. The protocol extracts fixed encoder features from image patches, pools them using attention-based or average pooling, and trains a linear classifier for final prediction. Use when the user wants to benchmark on Screening mammography dataset, or asks about evaluating this task. Reports linear evaluation.

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

---


# mammography-linear-eval

> Self-Supervised Deep Learning to Enhance Breast Cancer Detection on Screening Mammography — Miller et al. (2022) (arXiv:2203.08812, 2022)

## What this evaluates

Evaluates self-supervised learning models for breast cancer detection on screening mammography using a linear evaluation protocol on whole images derived from tiled patches. The protocol extracts fixed encoder features from image patches, pools them using attention-based or average pooling, and trains a linear classifier for final prediction.

## Datasets

- **Screening mammography dataset** — total ?; splits: (unstated)

## Metrics

- `linear evaluation` **(primary)** — range: [0, 1]
  - Accuracy of a linear classifier trained on fixed encoder features extracted via tiled-patch pretraining and attention-based pooling.

## Input / output format

**Input**: Tiled patches of whole mammogram images for pretraining; whole mammogram images for linear evaluation.

**Output**: Classification prediction from a linear classifier applied to pooled image embeddings.

## Scoring recipe

```python
def evaluate(image, encoder, classifier, pooling='MIP'):
    patches = split_into_patches(image)
    H = [encoder(patch) for patch in patches]
    if pooling == 'MIP':
        z = weighted_average(H, attention_scores(H))
    else:
        z = average(H)
    return classifier(z)
```

## Common pitfalls

- Cropping augmentations may remove localized cancer lesions, hurting performance.
- Large batch sizes are critical for SSL success but restricted by mammogram resolution and GPU memory.
- Global average pooling dilutes signals from localized lesions compared to attention-based pooling.

## Evidence (verbatim from paper)

> A classic way to test an SSL method is to train an encoder and then evaluate a linear classifier using the features extracted by the encoder with its parameters fixed, known as linear evaluation.

## Citation

```bibtex
@misc{miller2022selfsupervised,
  title={Self-Supervised Deep Learning to Enhance Breast Cancer Detection on Screening Mammography},
  author={Miller et al. (2022)},
  year={2022},
  note={arXiv:2203.08812}
}
```

- arXiv: 2203.08812

