THA-Flow Generative Model: Prosthesis Geometry Prediction from Preoperative CT
Authors: Yiping Wang, Jie Li, Jingyu Shen, Liao Wang
Organizations: Changzhou Jinse Medical Information Technology Co., Ltd., Changzhou 213000, Jiangsu, China · Shanghai Key Laboratory of Orthopaedic Implants, Department of Orthopaedic Surgery, Shanghai Ninth People’s Hospital, Shanghai Jiao Tong University School of Medicine, Shanghai, China
Preoperative planning for total hip arthroplasty (THA) is commonly framed as selecting a single prosthesis configuration and placement for a patient's osseous anatomy. In practice, however, the same anatomy may admit several clinically reasonable solutions, making planning inherently a one-to-many problem that is better represented by a conditional probability distribution. We present THA-Flow, a conditional flow-matching model that generates three-dimensional prosthesis geometry directly from preoperative CT. Separate AutoencoderKL models compress preoperative bone anatomy and prosthesis geometry, while a three-dimensional UNet learns a rectified flow from Gaussian noise to the prosthesis latent space under spatial bone conditioning and optional structured prosthesis parameters. The retrospective cohort comprised 1,355 hips from 1,149 patients undergoing primary THA. Following rigid registration of postoperative CT to preoperative CT, the actual postoperative prostheses were transformed independently according to the pelvic and femoral registrations and represented as a dual-channel truncated signed distance field. The prosthesis autoencoder achieved a peak signal-to-noise ratio of 47.11 dB and a structural similarity index of 0.9964 on the validation set. Complete acetabular and femoral geometries were generated across seven major stem models representing 93.4% of the cohort. Repeated bone-conditioned sampling preserved component position, alignment, and the principal bone-prosthesis interfaces while allowing limited local geometric variation. To our knowledge, THA-Flow represents the first application of generative AI to three-dimensional surgical planning for THA.
Figures & tables
Figure 1: Conditional inference architecture and generation modes of THA-Flow. a , Preoperative CT is encoded as a spatial bone condition, while the optional femoral stem model and size are encoded as semantic constraints. The three-dimensional generator transports a random latent state to a prosthesis latent, which is decoded in preoperative CT space. b , Outputs for the same patient under bone-only, bone-plus-model, and bone-plus-model-and-size conditions. Green denotes the acetabular cup and femoral head; blue denotes the femoral stem, separated from the head at the neck.
Figure 2: Patient-matched generation across major femoral stem designs. Each row represents one recorded postoperative stem model: Corail, SUMMIT, Accolade TMZF, and Tri-Lock from top to bottom. Columns show the preoperative CT, the actual prosthesis registered to preoperative space, bone-only generation, and generation conditioned on bone and the recorded stem model. The two generated results use the same initial noise; neither receives stem size or other component parameters. Green and blue denote the acetabular and femoral prosthesis channels, respectively.
Figure 3: Patient-matched generation across major femoral stem designs (continued). Secur-Fit, Wagner Cone, and M/L Taper are shown from top to bottom. Column definitions, conditioning modes, and colour coding are identical to those in Fig. 2 .
Figure 4: Bone–prosthesis fit and fill on consecutive sections and coronal projections. The upper half shows the actual prosthesis registered to preoperative space; the lower half shows the generated prosthesis conditioned on bone and the Corail stem model. Axial sections on the left progress from the distal stem to the acetabulum, while coronal projections on the right show overall component position and alignment. The femoral channel in blue demonstrates fit within the effective canal, distal stem geometry, and respect for the calcar boundary; the acetabular channel in green demonstrates the spatial relationship between the cup and the acetabular wall.
Figure 5: Within-patient bone-conditioned distribution relative to the clinical solution. A short-stem case is shown on the left and a long-stem case on the right. Green and blue solids represent the actual acetabular and femoral components registered to preoperative space. Coloured lines delineate portions of generated projections extending beyond the actual prosthesis under different initial noise samples; overlapping regions are not redrawn. Inference uses the preoperative bone condition only, without prosthesis parameters.
Figure 6: Latent pretraining and conditional rectified-flow matching. a , Bone and prosthesis autoencoders (AutoencoderKL) learn latent representations of preoperative CT and dual-channel prosthesis TSDF , respectively, and are frozen after reconstruction training. b , The bone latent is concatenated channel-wise with the current prosthesis path state. Stem model, size, and component parameters are encoded as semantic tokens. A three-dimensional UNet learns the conditional rectified flow from Gaussian noise to prosthesis geometry by velocity matching.
Operated side
Training
Validation
Test
Total
Left
572
46
31
649
Right
616
38
52
706
Total
1,188
84
83
1,355
Table 1: Distribution of included hips across the training, validation, and held-out test sets.
Stem model
Hips
Stem model
Hips
DePuy Corail
362
Not model-stratified
75
DePuy SUMMIT
343
Wagner Cone
53
Stryker Accolade TMZF
218
Zimmer M/L Taper
25
DePuy Tri-Lock
183
Zimmer Wagner SL
9
Stryker Secur-Fit
81
DePuy S-ROM
6
Table 2: Femoral stem model distribution in the included cohort.
Figure 7: Verification of prosthesis component parameters on postoperative CT. a–c , Candidate femoral-head spheres and hemispherical cup shells projected onto sagittal, coronal, and axial sections; fitting scores were computed over the complete three-dimensional volume. d , Definitions of cup outer diameter Dcup , head diameter Dhead , and fitted centre offset δfit along the cup axis. In this case, the billed cup diameter of 54 mm was corrected to a CT-measured diameter of 56 mm; δfit was used only for cup-shell localisation.
Figure 8: Independent rigid registration of the pelvis and femur establishes supervision in preoperative space. a,b , Preoperative and postoperative bone surfaces and ICP samples for the pelvic and femoral registrations. Pale yellow and pale green indicate preoperative and postoperative isosurfaces, red points indicate postoperative surface samples selected away from metal artefacts and surgically altered regions, and white lines indicate postoperative prosthesis contours. c , The acetabular and femoral components are returned independently to preoperative CT space using their respective rigid transformations.
Figure 9: TSDF representation of prosthesis geometry. a , Solid femoral stem extracted from postoperative CT on a mid-coronal section. b , Continuous signed distance field on the same section; the black line marks the zero level set and distances are truncated at ±5 mm. c , Closed, watertight stem surface recovered from the three-dimensional zero level set.
Branch
Epoch
L1
PSNR (dB)
SSIM
Preoperative bone
188
0.007946
35.85
0.9802
Prosthesis TSDF
97
0.003313
47.11
0.9964
Table 3: Best validation reconstruction performance of the bone and prosthesis autoencoders.
Figure 10: Latent reconstruction of the dual-channel prosthesis TSDF . The upper and lower rows show the acetabular and femoral channels, respectively. Columns show the original TSDF , autoencoder reconstruction, and contrast-enhanced absolute error.
Predicting long-term bone remodeling after mandibular reconstruction would be of great clinical benefit, yet standard generative models struggle to maintain trajectory-level consistency and anatomical fidelity over long horizons, particularly in low-data regimes. We introduce OsteoFlow, a flow-based framework predicting Year-1 post-operative CT scans from Day-5 scans. Our core contribution is Lyapunov-guided trajectory distillation: Unlike one-step distillation, our method distills a continuous trajectory over transport time from a registration-derived stationary velocity field teacher. Combined with a resection-aware image loss, this enforces geometric correspondence without sacrificing generative capacity. Evaluated on 344 paired regions of interest, OsteoFlow significantly outperforms state-of-the-art baselines, reducing mean absolute error in the surgical resection zone by ~20%. This highlights the promise of trajectory distillation for long-term prediction in low-data clinical settings. Code is available on GitHub: https://github.com/hamidreza-aftabi/OsteoFlow.
Hamidreza Aftabi, Faye Yu, Brooke Switzer +6
Department of Electrical and Computer Engineering, University of British Columbia, Vancouver, British Columbia, Canada · Sunnybrook Research Institute, University of Toronto, Toronto, Ontario, Canada · Department of Mechanical Engineering, University of British Columbia, Vancouver, British Columbia, Canada +1
In proton therapy, plans are typically optimized on a single planning CT, making robustness evaluation essential under anatomical changes. However, current scenarios often rely on simplified perturbations that poorly capture complex, patient-specific variability. We propose SynthRCT, a scalable conditional generative framework for 3D anatomical deformation synthesis. Based on a conditional variational autoencoder, SynthRCT learns a latent deformation space and decodes sampled latent codes into local stationary velocity fields conditioned on an input anatomy. Local fields are assembled into coherent full-volume transformations, enabling memory-scalable generation for large field-of-view CT data. We validate the approach on respiratory 4DCT data with multiple breathing-phase anatomies per subject. SynthRCT enables patient-specific sampling of plausible anatomical transformations beyond predefined robustness scenarios. Code available at: https://github.com/TomasGuija/SynthRCT.
Tomas Guija-Valiente, Blanca Rodriguez-Gonzalez, Norberto Malpica
Medical Image Analysis and Biometry Lab, Universidad Rey Juan Carlos, Madrid, Spain
Reconstruct where the images provide evidence, and generate where they do not: recent success of spatial world models such as Atlas (World Labs Team, 2026) highlights the value of unifying reconstruction and generation in one model. Yet the two have long lived in separate paradigms with distinctive failure modes: feed-forward reconstruction averages ambiguity into blur, while conditional generation invents plausible but scene-inconsistent detail. In this work, we present a unified flow-based formulation for reconstruction and generation, where a shared clean-target predictor performs direct reconstruction at its single-step endpoint and unfolds conditional generation through multi-step flow. A controlled toy study reveals the mechanism: with a single step, the predictor collapses to the conditional mean just like feed-forward methods, favoring consistency over diversity. With multi-step inference, the fidelity of generated details grows with context richness: closer observations reduce ambiguity and yield better-matched details. We further instantiate the formulation in appearance and geometry 3D tasks. JiT-LVSM improves perceptual and distributional quality in novel view synthesis, while JUSt3R retains competitive single-step geometry prediction with additional multi-step inference capabilities that reduces veil and flying-pixel artifacts, producing cleaner surface structure with greater test-time compute. Together, they show that reconstruction and generation can share both a formulation and a backbone, with their behavior governed by denoising configuration---making unification surprisingly simple.