Pretrained representations are increasingly used to share and reuse information from medical images without exposing the original scans, but it is unclear how much patient-specific information these representations retain. We investigate this question for brain magnetic resonance imaging (MRI) by evaluating five frozen pretrained encoders spanning different architectures, pretraining objectives, and training domains on two longitudinal T1-weighted datasets, OASIS-2 and MIRIAD. Under an attacker model with access to released embeddings, the corresponding public encoder, and auxiliary MRI scans, we evaluate patient linkage and sensitive-attribute inference. Across the evaluated representations, we observe substantial subject-specific information: rank-1 patient linkage reaches up to 99% on MIRIAD and exceeds 90% on OASIS-2 for the highest-risk representation, despite the absence of an identification objective during encoder training. We further show that the released embeddings retain information about a demographic attribute, with recorded-sex prediction reaching balanced accuracy of 90.9% on OASIS-2 and 95.5% on MIRIAD. Overall, our results demonstrate that replacing raw brain MRI with learned embeddings does not, by itself, eliminate patient-linkage or attribute-inference risk, and is therefore insufficient on its own to establish anonymity.
Figures & tables
Model
Pretraining objective
Input
Backbone
Pretraining domain
Dim.
AnatCL ( Barbano et al., 2026 )
Weakly sup. contrastive
3D
ResNet18
Brain MRI
512
3D-Neuro-SimCLR ( Kaczmarek et al., 2025 )
Contrastive (SimCLR)
3D
ResNet18
Brain MRI
512
Brain-MRI-SSL ( Huang et al., 2025 )
Contrastive (MoCov3)
2D
ResNet50
Brain MRI
2048
DINO-ViT ( Caron et al., 2021 )
Self-distillation
2D
ViT-B/8
Natural images
768
SAM-Med3D ( Wang et al., 2024 )
Sup. segmentation
3D
ViT
Multi-organ medical
384
Table 1: Overview of the pretrained encoders evaluated in this work.
Characteristics
OASIS-2
MIRIAD
Subjects
150
69
Sex
58.7% F, 41.3% M
55.1% F, 44.9% M
Classes
72 NC, 64 AD, 14 Converted
46 AD, 23 CN
Preprocessing
Yes
No
Scans per subject
at least 2 scans variable follow-ups (1–6+ years)
4–12 scans (up to 9 visits) intervals of 2 weeks–2 years
Table 2: Characteristics of the OASIS-2 and MIRIAD datasets used in this study.
Figure 1: Threat models for released brain MRI representations. (a) The data holder and attacker apply the same frozen feature extractor f to private and auxiliary scans, respectively; either collection may contain multiple acquisitions per subject. The hospital’s original scans remain unavailable to the attacker. (b) A linkage function assesses same-subject correspondence; re-identification additionally requires identity-linked reference information. (c) A predictor fitted to attribute-labeled auxiliary embeddings estimates a withheld attribute from a released embedding, without requiring successful linkage.
OASIS-2
MIRIAD
Model
Linkability
ReID@1
Linkability
ReID@1
AnatCL
0.9312
0.9205
0.9714
0.9971
3D-Neuro-SimCLR
0.6571
0.6647
0.7938
0.9787
Brain-MRI-SSL
0.5647
0.5764
0.8460
0.9816
DINO-ViT
0.7796
0.8235
0.8761
0.9870
SAM-Med3D
0.2627
0.1394
0.5139
0.8958
Table 3: Re-identification risk evaluation of the pretrained encoders on OASIS-2 and MIRIAD
OASIS-2
MIRIAD
Model
Bal. Acc.
Precision
Bal. Acc.
Precision
AnatCL
0.6772
0.6965
0.6946
0.6983
3D-Neuro-SimCLR
0.7011
0.7075
0.7789
0.7806
Brain-MRI-SSL
0.9093
0.9153
0.9546
0.9568
DINO-ViT
0.7894
0.8100
0.8716
0.8704
SAM-Med3D
0.8632
0.8735
0.8850
0.8887
Table 4: Sex classification performance on OASIS-2 and MIRIAD.
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
OASIS-2
MIRIAD
Linkability
ReID@1
Linkability
ReID@1
Model
Canberra
Cosine
Canberra
Cosine
Canberra
Cosine
Canberra
Cosine
AnatCL
0.9312
0.5707
0.9205
0.8716
0.9714
0.6017
0.9971
0.9971
3D-Neuro-SimCLR
0.6571
0.3502
0.6647
0.4794
0.7938
0.3888
0.9787
0.9176
Brain-MRI-SSL
0.5647
0.4204
0.5764
0.6461
0.8460
0.6674
0.9816
0.9788
DINO-ViT
0.7796
0.5694
0.8235
0.8412
0.8761
0.8677
0.9870
0.9899
Appendix
Table 5: Linkability and rank-1 matching under Canberra-based and cosine similarity. Bold marks the higher (i.e., stronger attack) value for each pair.
Within-dataset
Cross-dataset
OASIS-2
MIRIAD
OASIS-2 → MIRIAD
MIRIAD → OASIS-2
Model
Bal. Acc.
Prec.
Bal. Acc.
Prec.
Bal. Acc.
Prec.
Bal. Acc.
Prec.
AnatCL
0.6772
0.6965
0.6946
0.6983
0.4784
0.4769
0.5130
0.5132
3D-Neuro-SimCLR
0.7011
0.7075
0.7789
0.7806
0.5000
0.2763
0.6170
0.6198
Brain-MRI-SSL
0.9093
0.9153
0.9546
0.9568
0.5032
0.7783
0.6351
0.7759
DINO-ViT
0.7894
0.8100
0.8716
0.8704
0.5151
0.6039
0.5464
0.7682
Appendix
Table 6: Sex inference from frozen embeddings. Within-dataset results use a patient-disjoint split; cross-dataset results train on one cohort and test on the other. Best value per column in bold.
MIRIAD (full)
MIRIAD (capped 2–5)
Model
Linkability
ReID@1
Linkability
ReID@1
AnatCL
0.9714
0.9971
0.9653 ± 0.0143
0.9883 ± 0.0064
3D-Neuro-SimCLR
0.7938
0.9787
0.7829 ± 0.0214
0.9160 ± 0.0138
Brain-MRI-SSL
0.8460
0.9816
0.8420 ± 0.0166
0.9343 ± 0.0157
DINO-ViT
0.8761
0.9870
0.8778 ± 0.0182
0.9675 ± 0.0085
SAM-Med3D
0.5139
0.8958
0.5204 ± 0.0185
0.6246 ± 0.0298
Appendix
Table 7: Re-identification risk on MIRIAD: full dataset vs. capped (2–5 scans per subject). Capped results are reported as mean ± std over 10 random subsamplings.
Figure 2: Representative mated and non-mated score distributions (KDE) for AnatCL and DINO-ViT on OASIS-2 (top) and MIRIAD (bottom), with the linkability D↔sys .