AutoFFS: Adversarial Deformations for Facial Feminization Surgery Planning

Paul Friedrich, Florentin Bieder, Florian M. Thieringer, Philippe C. CattinarXiv 2026 · arXiv

TL;DR

AutoFFS introduces a data-driven framework for facial feminization surgery (FFS) planning by generating counterfactual 3D skull morphologies. By framing shape editing as a regularized, targeted adversarial attack on an ensemble of sex classifiers, the system automatically deforms masculine skull features into anatomically plausible feminine structures, providing objective, quantitative guidance for preoperative planning.

What Problem Does This Paper Address?

Facial feminization surgery (FFS) is a crucial component of gender-affirming care for many transgender women, involving procedures like forehead reshaping and jaw contouring. However, preoperative planning currently relies heavily on a surgeon's subjective assessment and qualitative experience. Existing computer-assisted tools typically focus on isolated regions (like the mandible) and fail to account for global, interconnected changes across the entire skull.

To bridge this gap, the authors address a fundamental counterfactual question: What would this specific patient's skull look like if it belonged to the opposite sex? Providing an automated, objective answer can give surgeons a reproducible, data-driven foundation for surgical planning.

Methods

The core innovation of AutoFFS is turning a machine learning vulnerability—adversarial attacks—into a clinical feature. Instead of modifying pixel intensities to fool a network, AutoFFS optimizes a spatial deformation field to alter the underlying anatomy.

Fig. 1: Overview of the proposed pipeline. We perform a deformation-based tar- geted 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.

The pipeline consists of the following steps:

  1. Classifier Ensemble: The authors pre-train an ensemble of binary sex classifiers (using ResNet and Squeeze-and-Excitation ResNet architectures) to learn discriminative features of sexual dimorphism from 3D skull scans.
  2. Free-Form Deformation (FFD): The deformation field is parameterized using a 3D cubic B-spline grid. This ensures that modifications are spatially smooth and continuous rather than chaotic.
  3. Targeted Adversarial Attack: During planning, the weights of the classifiers are frozen. The framework optimizes the control points of the FFD to maximize the probability of the target sex. To make the optimization robust, they introduce a smooth worst-case margin loss ($\mathcal{L}_{swm}$) based on the log-sum-exp operator, which forces the deformation to satisfy the most resistant classifier in the ensemble.
  4. Regularization: To ensure anatomical plausibility, the loss function includes Jacobian smoothness and bending energy regularizers, preventing rapid spatial variations or tearing in the deformed skull.
Fig. 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 bound- aries into the female distribution.

Datasets

Because full-skull CT scans of healthy individuals are difficult to acquire due to radiation ethics, the authors utilized T1-weighted magnetic resonance (MR) scans from the Swiss Multiple Sclerosis Cohort-study (SMSC). Since MS affects the central nervous system, cranial bone morphology remains unaffected, making it an excellent surrogate dataset.

The dataset contains 444 MR scans (152 male, 292 female). The authors segmented the bone structures using a pre-trained deep learning model (GRACE) and cropped the volumes to the frontal half ($256 \times 256 \times 128$ voxels) to isolate relevant facial features.

Key Insights and Ideas

  • Harnessing Adversarial Trajectories: Rather than treating adversarial examples as a security flaw, this work demonstrates that traversing across classifier decision boundaries can map out smooth, biologically meaningful trajectories in shape space.
  • The Power of the Ensemble: Optimizing against a single classifier yields brittle results that fail to generalize. By forcing the deformation field to fool an ensemble of diverse architectures, the framework targets robust, population-level dimorphic traits, achieving a 100% success rate on hold-out evaluation networks.
  • Emergent Anthropological Alignment: Remarkably, no anatomical priors were hardcoded into the system. Yet, the largest deformations naturally concentrated in the chin, brow ridges, forehead, and zygomatic (cheek) bones. This perfectly mirrors established anthropological literature on cranial sexual dimorphism, proving the classifiers successfully captured true biological markers.

Key Results

The authors validated AutoFFS using three distinct approaches:

  • Classifier-Based Evaluation: Skulls deformed by the ensemble method achieved a 100% flip rate when evaluated on completely unseen hold-out classifiers, compared to just ~71% when optimized without an ensemble.
  • Distributional Alignment: The authors introduced two new population-level metrics: Morphological Fréchet Distance (MFD) and Morphological Kernel Distance (MKD). Following feminization ($m \rightarrow f$), the MFD dropped by 83% and the MKD dropped by 86% relative to the baseline inter-sex distance, indicating that the generated shapes successfully aligned with the target population's distribution.
  • Human Perceptual Study: In a blinded study with 11 human raters, the classification accuracy dropped from 81% on real skulls to 37% on transformed skulls. This means that human observers perceived the intended target sex in 63% of cases, confirming that the algorithmic modifications translate to human visual perception.

Limitations and Future Work

While promising, the authors note several limitations on the path to clinical adoption:

  • Cohort Bias: The dataset is relatively small, geographically restricted to Switzerland, and exhibits a class imbalance toward female subjects (inherent to MS demographics).
  • Imaging Modality: The framework was trained on MR-derived bone segmentations. Although accurate, Computed Tomography (CT) remains the clinical standard for surgical planning. Translating this method to a large-scale CT dataset is a primary goal for future work.
  • Bony Structures Only: FFS involves both hard and soft tissue modifications. Currently, AutoFFS only alters bone morphology; integrating soft-tissue simulations and automatically deriving patient-specific surgical tools (like 3D-printed cutting guides) are essential next steps.

Summary updated

Abstract

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.
BibTeX
@misc{friedrich2026autoffs,
  author = {Paul Friedrich and Florentin Bieder and Florian M. Thieringer and Philippe C. Cattin},
  title = {{AutoFFS: Adversarial Deformations for Facial Feminization Surgery Planning}},
  year = {2026},
  eprint = {2603.02288},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.02288},
}

Loading related content...

Figure