SRED: Sparse Regional Evidence Distillation Across Magnifications in Whole-Slide Imaging
Authors: Zhiyuan Yang, Jiahao Cheng, Vincent Quoc-Huy Trinh, Mahdi S. Hosseini
Organizations: Department of Computer Science and Software Engineering (CSSE), Concordia University, Montreal, Canada · Axe Cancer, Centre de recherche du CHUM, Université de Montréal, Montréal, Canada · Mila - Quebec AI Institute, Montreal, Canada
In computational pathology, high-magnification whole-slide image analysis preserves tissue detail but requires encoding many patches, whereas lower magnification reduces computation by covering a higher field of view per patch while sacrificing detail. Existing cross-magnification distillation matches features that often encode detail unreachable by low-magnification input, sometimes requiring slide-level labels that limit scalability. To address those issues, we introduce Sparse Regional Evidence Distillation (SRED), which transfers regional event occurrences that encode reachable high-level interactions between details without slide-level labels. We use a sparse autoencoder (SAE) to learn an event dictionary from 20x teacher features. Logical OR pooling records whether each event is detected in any spatially aligned patch, retaining both localized and shared evidence within the corresponding 5x region. A pretrained 5x encoder is fine-tuned to predict these regional targets without slide-level labels. Visual analysis identifies dictionary components responsive to recognizable histological patterns, supporting target interpretation. Compared with native 5x features, SRED improves average macro-F1 by 1.1 points across seven classification and grading cohorts and average C-index by 1.7 points across five survival cohorts. Runtime matches native 5x, with an average 11.58x speedup over 20x.
Figures & tables
Figure 1: WSI Cross-magnification knowledge transfer . (a) High-magnification teacher guides a model learning from lower-magnification inputs. (b) Representative transfer strategies: (A) transfers regional and local features [ 52 ] ; (B) transfers region relevance to a low-mag selector [ 11 ] ; and (C) matches feature maps and pooled representations from different tissue resolutions [ 15 ] .
Figure 2: SRED transfers regional sparse evidence from 20× children to a 5× encoder. (a) An SAE learns a sparse dictionary from 20× UNI2-h features. (b) A 5× encoder learns to predict regional events detected in 20× patches. (c) Positive latent activations for each aligned 5× region are binarized and combined by logical OR to form regional event targets. (d) The distilled encoder supplies 5× patch features for downstream tasks. (e) The plot shows the percentage of 5× regions in which each event occurs from SAE training. (f) Each group shows activating tissue examples with pathologist descriptions for latents labelled in (e). (g) The t-SNE compares native and distilled 5× features and their links to aligned 20× children on one TCGA-KIRC slide.
Native
Cross-magnification KD methods
Dataset
Metric
5×
20×
XMAG [ 52 ]
LRMIL [ 50 ]
SRED (ours)
CAM16
AUROC
0.9773±0.0146
0.9719±0.0247
0.9275±0.0195
0.8897±0.0378
0.9905±0.0105
CAM17
Macro-F1
0.5894±0.0310
0.6705±0.0375
0.5508±0.0535
0.5118±0.0318
0.6116±0.0515
Private-CRC
Macro-F1
0.8105±0.0124
0.8229±0.0187
0.8191±0.0204
0.7794±0.0356
0.8249±0.0188
BRACS
Macro-F1
0.4375±0.0399
0.3875±0.0533
0.3825±0.0209
0.3021±0.1228
0.4273±0.0246
PANDA
QW κ
0.8367±0.0078
0.8661±0.0046
0.8247±0.0018
0.8181±0.0037
0.8587±0.0062
Table 1: Clinical benchmark comparison. Entries are mean±SD , with sample SD over five seeds. Native 5× and Native 20× use UNI2-h [ 8 ] features at the corresponding magnification, and XMAG uses its released encoder. LRMIL is our local reproduction of its paper setting. Higher values are better for every metric. Bold marks the best mean across all methods, and underlining marks the best among XMAG, LRMIL and SRED. For XMAG [ 52 ] , red entries mark cohorts used for their encoder pretraining. Our SAE training and distillation exclude these data. Green backgrounds mark the top three means in each row, from darkest (best) to lightest (third), excluding XMAG for survival. Our method often matches the highest native performance closely, sometimes exceeding them.
Figure 3: Dictionary fitting and distillation share anatomical coverage but use different inputs. (a) SAE fitting uses 254,780,319 20× features from 24,556 slides. (b) Distillation uses 11,313,866 5× fields from 15,963 slides.
Figure 4: Downstream cohorts cover classification, grading and survival. The inner ring groups tasks; the outer ring groups twelve cohorts, with areas proportional to their 20,725 labeled slides. KIRC/KIRP/LUAD/STAD/UCEC denote TCGA cohorts.
Figure 5: Attention heatmaps for classification and survival prediction. BRACS (top) and TCGA-STAD (bottom) examples. Within each slide, regions A and B mark the same tissue locations across methods. Display scales are normalized separately for each method.
Width dSAE
MSE ↓
FVU ↓
Observed (%)
Unobserved (%)
4,096
0.2500
0.2422
100.0000
0.0000
8,192
0.2360
0.2286
99.9756
0.0244
16,384
0.2297
0.2225
96.9727
3.0273
32,768
0.2273
0.2202
84.1431
15.8569
Table 2: Dictionary width ablation. Observed and unobserved report the percentages of dictionary components with and without a positive activation anywhere in this set. Green marks our selected setting.
Positive activations (%)
Active limit k
FVU ↓
0<z≤0.5
0.5<z≤1
1<z≤2
z>2
16
0.2750
0.0000
0.0035
1.3536
98.6429
32
0.2225
0.0001
0.0653
23.5641
76.3705
64
0.1727
0.0017
2.9744
52.2741
44.7497
128
0.1279
0.0707
27.8718
46.1693
25.8881
Table 3: Sparsity ablation. FVU and activation percentages are computed in the same set as Table 2 . Percentages use positive activations as the denominator. The intervals describe activation magnitudes and event detection remains defined by z>0 .
Encoder
CAM16
IMP
TCGA-STAD
AUROC
Macro-F1
C-index
Native 5×
0.9510±0.0490
0.8982±0.0083
0.6287±0.0554
Native 20×
0.9961±0.0088
0.8970±0.0108
0.6352±0.0466
Contrastive fine-tuning
0.8971±0.0443
0.9002±0.0070
0.6276±0.0524
SRED
0.9686±0.0408
0.9078±0.0091
0.6434±0.0518
Table 4: . We compare contrastive learning on 5× patches with regional distillation from their aligned 20× children. Native UNI2-h features provide references at both magnifications.
Design
CAM16
IMP
TCGA-STAD
AUROC
Macro-F1
C-index
AND
0.9451±0.0567
0.8994±0.0110
0.6361±0.0585
OR − AND
0.9657±0.0449
0.9063±0.0105
0.6359±0.0520
Occupancy
0.9520±0.0595
0.9018±0.0103
0.6336±0.0575
OR
0.9686±0.0408
0.9078±0.0091
0.6434±0.0518
Table 5: Regional aggregation ablation. We compare OR, AND, OR − AND and occupancy targets from the same child codes. Occupancy records the fraction of children activating each latent.
Design
CAM16
IMP
TCGA-STAD
AUROC
Macro-F1
C-index
No anchor
0.9569±0.0429
0.8973±0.0087
0.6285±0.0220
Parameters
0.9324±0.0342
0.9038±0.0104
0.6283±0.0494
Relations
0.9696±0.0340
0.8998±0.0112
0.6148±0.0572
Squared L2
0.9676±0.0423
0.9041±0.0054
0.6232±0.0517
Cosine
0.9686±0.0408
0.9078±0.0091
0.6434±0.0518
Table 6: Native-feature anchoring ablation. We compare no anchor with parameter, relational, squared L2 and cosine penalties. Squared L2 constrains both feature direction and magnitude, while cosine constrains direction alone.
Native
SRED (ours)
MIL
5×
20×
5×
CAM16 (AUROC)
TransMIL
0.9046±0.0422
0.8073±0.0596
0.9086±0.0561
nnMIL
0.9502±0.0270
0.9608±0.0246
0.9497±0.0227
RRT-MIL
0.9270±0.0577
0.9322±0.0440
0.9281±0.0539
Private-CRC (Macro-F1)
Table 7: Comparison across MIL architectures. Each MIL architecture uses UNI2-h features at 5× and 20× , or SRED at 5× .
Appendix figures & tables15 assets
Supplementary material from the paper’s appendix.
Appendix
Setting
Value
Dictionary size dSAE
16,384
TopK sparsity k
32
Optimizer
Adam
Learning rate
10−3 , constant
Adam (β1,β2)
(0.9,0.999)
Adam ϵ
10−8
Appendix
Table 8: SAE training configuration. The inactivity window determines eligibility for auxiliary reconstruction.
Setting
Value
Student initialization
Pretrained UNI2-h
MLP hidden dimension
1,024
Optimizer
AdamW
Encoder learning rate
10−5
MLP learning rate
10−4
AdamW (β1,β2)
(0.9,0.999)
Appendix
Table 9: Training config for cross-magnification distillation.
Dataset
Slides
20× features
TCGA
9,501
132,633,661
CPTAC
6,738
35,702,601
EBRAINS
3,114
33,283,668
MUT-HET-RCC
781
8,679,542
OV-Bevacizumab
286
5,608,897
BC-therapy
166
340,677
Appendix
Table 10: SAE training datasets. Training slides and features after dataset exclusions and removal of duplicate coordinates.
Partition
Slides
Groups
5× regions
Training
15,963
10,392
11,313,866
Validation
3,486
2,227
2,496,874
Evaluation
3,940
2,619
2,919,381
Appendix
Table 11: Cross-magnification distillation partitions. Groups follow the recorded patient identifiers or the dataset’s declared specimen and slide grouping rules. Linked slides share a partition.
Native
Cross-magnification KD methods
Dataset
Metric
5×
20×
XMAG [ 52 ]
LRMIL [ 50 ]
SRED (ours)
CAM16
Accuracy ↑
0.9306±0.0354
0.9611±0.0206
0.8722±0.0248
0.8000±0.0990
0.9528±0.0158
AUROC ↑
0.9773±0.0146
0.9719±0.0247
0.9275±0.0195
0.8897±0.0378
0.9905±0.0105
Macro-F1 ↑
0.9288±0.0359
0.9594±0.0216
0.8673±0.0269
0.7687±0.1563
0.9514±0.0159
CAM17
Accuracy ↑
0.8292±0.0453
0.8462±0.0308
0.7846±0.1042
0.8523±0.0167
0.8154±0.0326
AUROC ↑
0.8515±0.0149
0.8701±0.0174
0.8238±0.0293
0.7989±0.0293
0.8792±0.0100
Appendix
Table 12: Classification and grading. Accuracy, AUROC and macro-F1 complement the primary endpoints in the main clinical benchmark. IMP and IMP-Cervix use mean-pooled features with logistic regression. PANDA also reports quadratic weighted κ and grade MAE.
System
Time ↓ (s/slide)
Speedup ↑
Network ↓ (TFLOPs/slide)
GPU ↓ (GiB)
Native 20×
70.04
1.00
5,015.38
3.81
Native 5×
6.03
11.61
330.89
3.51
SRED (ours)
6.05
11.58
330.89
3.51
Appendix
Table 13: Inference cost. Time includes slide preparation through prediction. Speedup is relative to the total native 20× time. Network FLOPs are calculated for the encoder and downstream predictor using each slide’s actual patch count. GPU memory is the peak PyTorch allocation.
λF
CAM16
IMP
TCGA-STAD
AUROC
Macro-F1
C-index
0.001
0.9706±0.0384
0.9048±0.0104
0.6357±0.0557
0.016
0.9588±0.0555
0.9041±0.0106
0.6348±0.0556
0.004 (Default)
0.9686±0.0408
0.9078±0.0091
0.6434±0.0518
Appendix
Table 14: Cosine-anchor strength ablation. We compare the original weight λF with weaker anchor 0.25λF and strong one 4λF .
Design
CAM16
IMP
TCGA-STAD
AUROC
Macro-F1
C-index
ASL
0.9578±0.0572
0.9038±0.0098
0.6365±0.0523
BCE
0.9686±0.0408
0.9078±0.0091
0.6434±0.0518
Appendix
Table 15: Occurrence-loss ablation. ASL reduces the contribution of confidently predicted negatives.
Latent
Occurrence (%)
Pathologist’s description and comments
Additional tissue structures
1385
27.6106
Glandular structures from different organs.
4668
46.6330
Large glandular structures with large lumens.
2874
42.9318
Large glandular structures on an eosinophilic background.
3514
35.7496
Glandular and parenchymal cells.
2070
27.2946
Well-defined clusters of epithelial cells.
Appendix
Table 16: Additional pathologist annotations of SAE responses. Each row describes patches activating the indicated latent. Occurrence is the percentage of 5× distillation training regions whose OR target includes that latent.
Figure 6: Additional tissue patterns associated with SAE responses. Each 2×2 group contains patches nominated by the pathologist for the same latent. Labels give the tissue description and regional occurrence, as in Fig. 2 of the main paper.
Figure 7: Additional attention comparisons for classification. Rows show CAM16 tumor_044 and CAM17 patient_055_node_3. Both native encoders and SRED emphasize the lower region on CAM16 and the densely stained left region on CAM17. A and B mark corresponding tissue locations across all panels.
Figure 8: Attention comparisons for survival. Rows show TCGA-LUAD TCGA-50-8457 and TCGA-STAD TCGA-RD-A7BT. A and B mark corresponding tissue locations across all panels.
Figure 9: Attention on a prostate biopsy and a renal section. Top: PANDA slide 615b584af86176f21b7a609807c56197. Bottom: TCGA-KIRC slide TCGA-BP-5010. A and B mark corresponding tissue locations across all panels.
Department of Computer Science and Software Engineering (CSSE) Concordia University Montreal, Canada · Department of Computer Science and Software Engineering (CSSE) Concordia University Montreal, Canada Mila – Quebec AI Institute Montreal, Canada
1Nhu Department of Electrical Engineering and Computer Science, University of California, Irvine · Department of Electrical & Computer Engineering, National University of Singapore · 3PuzzleLogic Pte Ltd, Singapore 229594, Singapore