1 MIN READ
preprint · 2026 · Preprint · CVIP 2025 in printDataset-Informed Transfer Learning
What if the dataset sets its own hyperparameters?
Not peer reviewed — treat the numbers below as preliminary.
IN ONE SENTENCE
Summary
Take the three quantities I previously hand-tuned — sample difficulty, triplet margin, neighbour count — and derive all of them from the data's own self-supervised feature space instead.01 / THE QUESTION
My own previous method did not scale.
The earlier neighbourhood-representation loss worked, but it needed a hand-set difficulty weight, a fixed triplet margin found by sweeping, and a neighbour count chosen per dataset. On a 116-image ROI set that is tolerable; on a 20,000-image screening cohort it is not.
It had also only ever been evaluated on one dataset.
02 / THE IDEA
Read the three quantities off the feature space.
Difficulty becomes one minus the label purity of a sample's k nearest neighbours in the self-supervised feature space, normalized per mini-batch — no confidence heuristic, no γ to tune. The triplet margin becomes a learnable softplus parameter. And k is simply the square root of the dataset size.
All neighbour statistics are computed once, offline, with FAISS. Training cost is essentially unchanged.
- 01SSL pretraining
- 02Feature bank
- 03k = √N neighbours
- 04Difficulty + neighbours
- 05A-DWCE + A-NR-Triplet
- 06Fine-tuned model
03 / WHAT WE TESTED
From a 116-image ROI set to a 4,000-image screening test set.
Five tasks across four cohorts: breast density and BI-RADS categorization on VinDr-Mammo, plus ROI classification on CDD-CESM and the CBIS-DDSM calcification and mass subsets. Both DINO/ViT and SimCLR/ResNet backbones.
Baselines were cross-entropy, focal loss, published prior state of the art, and my own earlier AGE result on the same test split. Five runs each.
04 / MAIN RESULT
It beats my previous best, and it admits where it loses.
On the largest cohort, VinDr-Mammo breast density, macro F1 goes from 0.576 with plain cross-entropy to 0.609 with DITL — past focal loss and past my own AGE result of 0.591 — with accuracy up from 0.786 to 0.838.
It is not a clean sweep: focal loss keeps the best AUC on the calcification and mass ROI tasks. The gains are largest exactly where they should be, in the small-data ROI settings and on under-represented classes.
| Method | Accuracy | Macro F1 | AUC |
|---|---|---|---|
| Cross-entropy | 0.786 | 0.576 | 0.928 |
| Focal loss | 0.802 | 0.584 | 0.940 |
| Nguyen et al. (prior SOTA) | — | 0.552 | — |
| AGE (my earlier work) | 0.796 | 0.591 | 0.931 |
| A-DWCE only | 0.837 | 0.596 | 0.940 |
| DITL | 0.838 | 0.609 | 0.942 |
Standard deviations and the full ROI-level tables for both DINO and SimCLR backbones are in the preprint. Two-tailed unpaired t-test, p < 0.0001.
05 / WHY IT MATTERS
A recipe you can move between cohorts.
The practical value is not the extra 1.8 points of F1. It is that the same objective runs unchanged on a small ROI dataset and a national screening cohort, because there is nothing left to tune.
It also improves recognition of the rare, high-risk categories that matter most in screening and that plain cross-entropy quietly ignores.
LIMITATION
What this does not show
This is a preprint and has not completed peer review. Gains are modest on some tasks, focal loss still wins AUC on two of them, and everything here is mammography on retrospective public data.
READ IT YOURSELF
Paper · DOI · Code · Citation
View original abstract + citation
Abstract
Enhancing downstream mammography classification is difficult across both small ROI datasets and large screening cohorts because of severe class imbalance. Conventional transfer learning rarely models dataset-specific characteristics, and recent neighbourhood-informed strategies rely on rigid formulations that limit scalability. DITL derives three properties from a self-supervised feature space — per-sample difficulty from k-nearest-neighbour label purity, the mean of the nearest same-class neighbours, and the mean of the farthest different-class neighbours — with k set adaptively to the square root of the dataset size. These drive an adaptive difficulty-weighted cross-entropy (A-DWCE, hyperparameter-free) and an adaptive neighbourhood triplet loss (A-NR-Triplet, learnable margin). Across four cohorts and five tasks, DITL improves over cross-entropy, focal loss and prior work with negligible training overhead.
Citation
A. Bhandary Panambur, S. Bayer, A. Maier. Re-thinking Mammography Transfer Learning: The Dataset-Informed Transfer Learning (DITL) Framework for Breast Cancer Screening and Lesion Diagnosis. arXiv:2607.26043, 2026.