AutoFFS: Adversarial Deformations for Facial Feminization Surgery Planning
Authors: Paul Friedrich, Florentin Bieder, Florian M. Thieringer, Philippe C. Cattin
Organizations: Department of Biomedical Engineering, University of Basel, Allschwil, Switzerland · Department of Oral and Cranio-Maxillofacial Surgery, University Hospital Basel, Basel, Switzerland
Facial feminization surgery (FFS) is a key component of gender affirmation for transgender and gender diverse patients, aiming to reshape craniofacial structures toward a female morphology. Current surgical planning procedures largely rely on subjective clinical assessment, lacking quantitative and reproducible anatomical guidance. We therefore propose AutoFFS, a novel data-driven framework that generates counterfactual skull morphologies through adversarial free-form deformations. Our method performs a deformation-based targeted adversarial attack on an ensemble of pre-trained binary sex classifiers that learned sexual dimorphism, effectively transforming individual skull shapes toward the target sex. The generated counterfactual skull morphologies provide a quantitative foundation for preoperative planning in FFS, driving advances in this largely overlooked patient group. We validate our approach through classifier-based evaluation, propose Morphological Fréchet Distance (MFD) and Morphological Kernel Distance (MKD) to evaluate distributional alignment of generated and real populations, and perform a human perceptual study, confirming that the generated morphologies exhibit target sex characteristics.
Figures & tables
Figure 1: Overview of the proposed pipeline. We perform a deformation-based targeted adversarial attack on an ensemble of pre-trained binary sex classifiers by optimizing the deformation field given the target class label ytarget . Illustration is in 2D for visualization purposes, but the pipeline works in 3D.
Figure 2: Illustration of the targeted adversarial attack as a trajectory through a simplified 2D representation space. The deformation field optimization moves a sample from the male distribution across all ensemble classifier decision boundaries into the female distribution.
ResNet
SE-ResNet
Depth
Acc. (↑)
F1 (↑)
AUROC (↑)
Acc. (↑)
F1 (↑)
AUROC (↑)
18
0.924
0.932
0.969
0.894
0.904
0.964
34
0.939
0.946
0.979
0.924
0.932
0.988
50
0.924
0.929
0.976
0.848
0.865
0.949
101
0.864
0.880
0.931
0.818
0.842
0.937
Table 1: Classifier performance on the hold-out test set.
Figure 3: Class probabilities from the hold-out classifier ensemble after applying our proposed framework with ( top ) and without ( bottom ) the ensembling strategy.
Comparison
MFD
MKD ( ×103 )
Real female vs. real female (intra-class)
0.24±0.19
0.15±1.89
Real male vs. real male (intra-class)
0.57±0.52
0.62±9.30
Real male vs. real female
56.82
662.38
Gen. female (m → f) vs. real female
10.32[4.36,18.11]
196.68[32.98,117.93]
Gen. male (f → m) vs. real male
10.99[6.57,18.34]
191.11[78.01,375.47]
Table 2: Morphological Fréchet Distance (MFD) and Morphological Kernel Distance (MKD, ×103 ) between population pairs, computed from hold-out SE-ResNet18 features. Lower values indicate greater distributional similarity. Intra-class values are averaged over 100 random splits; bootstrapped 95% CIs are shown in brackets.
Figure 4: Example transformations. ( Left, top ) FFS example from a lateral view. ( Left, bottom ) FMS example from a frontal view. ( Right ) Result without B-spline formulation and regularization.
Category
Acc.
κinter
κintra
Real
0.81±0.06
0.51
0.78
Generated
0.37±0.08
0.37
0.43
Table 3: Perceptual study results ( N=11 ). We report classification accuracy (mean ± SD across raters), inter-rater agreement ( κinter , Fleiss’) and intra-rater agreement ( κintra , average pairwise Cohen’s κ ).
School of Computing and Electrical Engineering Indian Institute of Technology Mandi Himachal Pradesh, India · University Teaching Department, CSVTU Bhilai, India