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.
The pipeline consists of the following steps:
- 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.
- 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.
- 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.
- 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.
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