Manuscript Offprint
arXiv:2609.05579ViT3Flow: A Test-Time Training Transformer MeanFlow for Postoperative Radiograph Synthesis in Scoliosis
*Rui Tang, Sicheng Yang, and Moxin Zhao contributed equally to this work.
†Corresponding authors: Menglin Cong (congmenglin@sdu.edu.cn) and Nan Meng (nanmeng@hku.hk).
Anonymous Author(s): Preprint submitted to Elsevier
Page 1 of 15
Highlights
ViT³Flow: A Test-Time Training Transformer MeanFlow for Postoperative Radiograph Synthesis in Scoliosis
Rui Tang, Sicheng Yang, Moxin Zhao, Hongqiu Wang, Guankun Wang, Lei Zhu, Hongliang Ren, Menglin Cong, and Nan Meng
-
We formulate postoperative scoliosis radiograph synthesis as patient-conditioned finite-interval generative transport and propose ViT³Flow, a single-NFE MeanFlow framework that integrates test-time-training-based token adaptation with diagnosis-routed retrieval of preoperative anatomy.
-
We develop the first paired dataset for postoperative scoliosis radiograph synthesis, comprising 632 preoperative–postoperative whole-spine radiograph pairs.
-
ViT³Flow introduces a case-adaptive transport architecture that couples test-time-training token dynamics with interval-conditioned anatomical retrieval. The proposed Spinal Morphology Extraction Agent extracts distributions of dominant-curve region and direction from the preoperative radiograph, enabling Diagnosis-Routed Interval Cross-Attention (DRICA) to perform anisotropic and interval-dependent retrieval of spatially corresponding preoperative evidence throughout MeanFlow transport.
-
Extensive experiments on the proposed dataset demonstrate that ViT³Flow consistently outperforms representative baselines in perceptual quality, anatomical fidelity, and clinically relevant geometric accuracy, highlighting its potential to support scoliosis surgical planning.
Department of Orthopaedics and Traumatology The University of Hong Kong Pokfulam Hong Kong SAR China.
Department of Orthopaedics and Traumatology The University of Hong Kong-Shenzhen Hospital Shenzhen 518053 China.
ROAS Thrust Systems Hub The Hong Kong University of Science and Technology (Guangzhou) Guangzhou China.
Department of Systems Hub The Hong Kong University of Science and Technology (Guangzhou) Guangzhou China and The Hong Kong University of Science and Technology Hong Kong SAR China.
Department of Electronic Engineering The Chinese University of Hong Kong Hong Kong SAR China.
Department of Orthopaedic Surgery Qilu Hospital of Shandong University Jinan Shandong 250012 China.
ARTICLE INFO
Keywords:
Scoliosis
Postoperative radiograph synthesis
MeanFlow
TTT
Diagnosis-guided generation
ABSTRACT
Predicting postoperative spinal morphology from preoperative radiographs could provide valuable support for scoliosis surgical planning, but remains challenging because surgical correction induces large spatial changes while anatomical structures must be faithfully retained. We formulate this problem as postoperative scoliosis radiograph synthesis and construct ScioliSurg, the first paired dataset for this task, comprising 632 preoperative–postoperative whole-spine radiograph pairs with structured morphology information. We further propose ViT³Flow, a single-NFE conditional Mean-Flow framework for efficient postoperative radiograph synthesis. ViT³Flow models surgical correction as finite-interval generative transport and replaces conventional self-attention with test-time-training token mixers that perform sample-specific inner adaptation to the anatomy and deformity pattern of each case. In addition, a Spinal Morphology Extraction Agent extracts distributions of dominant-curve region and direction from the preoperative radiograph. These distributions guide Diagnosis-Routed Interval Cross-Attention (DRICA), which performs interval-dependent vertical, horizontal, joint, and global retrieval from a separate preoperative token stream. This design enables the evolving postoperative representation to incorporate spatially corresponding anatomical evidence throughout the transport process. Extensive experiments on ScioliSurg demonstrate that ViT³Flow achieves the best performance among the compared methods in perceptual image quality, anatomical fidelity, and clinically relevant geometric accuracy, while requiring only a single network evaluation. These results highlight the potential of ViT³Flow for efficient and anatomically faithful postoperative radiograph synthesis in scoliosis surgical planning.
1. Introduction
Accurate anticipation of postoperative spinal alignment is an important component of individualized scoliosis surgical planning. Preoperative whole-spine radiographs, together with Cobb angle and global-alignment measurements, provide the principal basis for characterizing deformity and defining correction objectives [13]. However, the postoperative configuration is determined by coordinated correction across multiple vertebral levels rather than by an isolated change in a single angular measurement. Its spatial pattern further depends on the preoperative curve configuration, deformity severity, and anatomy [24]. Reliable prediction of the complete postoperative spinal morphology therefore remains an unresolved requirement for surgical planning.
Current computational approaches do not directly address this requirement. Learning-based studies have primarily supported scoliosis surgical planning through preoperative deformity characterization [9], disease-progression assessment [11], and complication-risk estimation [22]. A smaller body of work predicts postoperative angular or alignment parameters [23]. These methods provide valuable information for patient assessment, risk stratification, and quantitative outcome estimation, but describe the expected surgical result using only a limited set of numerical variables. Even when several geometric parameters are considered jointly, they cannot fully represent the spatial distribution of correction across vertebral levels or the complete postoperative appearance of the anatomy.
Deep learning-based medical image synthesis offers a potential approach for predicting postoperative radiographic appearance. Existing synthesis studies in spinal imaging have primarily focused on transformations across imaging views or modalities, including coronal-to-sagittal radiograph synthesis [1], MRI-to-CT translation [6], lumbar MRI-to-CT generation [20], and ultrasound-to-radiograph synthesis [30]. These tasks generally preserve the underlying anatomical configuration, with the source and target images differing mainly in imaging perspective, contrast, or modality. In contrast, preoperative-to-postoperative synthesis requires the generation of a surgically altered spinal configuration while retaining patient-specific anatomical characteristics. As illustrated in Fig. 1(a), direct image-to-image translation enables efficient conditional synthesis [10], and registration-guided methods improve spatial correspondence [12]; however, a direct source-to-target mapping
ORCID(s):
Anonymous Author(s): Preprint submitted to Elsevier
Page 1 of 15 may be insufficient to represent heterogeneous and patient-dependent structural correction. As shown in Fig. 1(b), diffusion models provide greater generative flexibility through progressive denoising [8], whereas flow matching formulates generation as continuous probability transport [14]. These approaches commonly rely on iterative sampling with multiple network evaluations, increasing latency and computational cost in clinical planning workflows. This motivates a low-NFE formulation capable of modeling large corrections while preserving anatomical correspondence.
MeanFlow provides an efficient formulation for this task by learning an interval-averaged velocity rather than only an instantaneous velocity [5], allowing a single network evaluation to represent a substantial portion of the generative trajectory. However, MeanFlow primarily reduces temporal discretization and does not by itself determine how conditions should be represented or incorporated into the transport field. The predicted interval velocity is still parameterized by a generative backbone, and a backbone with token-mixing parameters shared across all samples applies the same learned token-processing function to scoliosis cases with markedly different vertebral morphology, dominant-curve region, curve direction, and deformity pattern. Moreover, treating the preoperative radiograph as a global condition does not distinguish regions requiring substantial correction from structures whose anatomical identity should be retained. Because each finite-interval update covers a large portion of the trajectory, inadequate sample-specific adaptation or imprecise source conditioning may propagate structural errors over the entire interval rather than allowing them to be progressively corrected through multiple local evaluations. Accordingly, the effectiveness of finite-interval transport depends not only on the transport formulation itself, but also on the model's ability to accommodate inter-patient variation and maintain anatomically grounded conditioning.
To address these challenges, we construct ScoliSurg, to our knowledge the first paired dataset for postoperative scoliosis radiograph synthesis, comprising 632 matched preoperative and postoperative radiograph pairs. ScoliSurg enables the direct learning and evaluation of postoperative morphology. As illustrated in Fig. 1(c), we further propose ViT³Flow, a single-NFE generative framework that models postoperative synthesis as patient-conditioned finite-interval transport. ViT³Flow parameterizes the interval-averaged velocity using a DiT-style backbone [19], in which visual test-time-training token mixers [7] perform sample-specific inner updates to adapt the token-mixing computation to the current case and generative state. To introduce structured preoperative conditioning, the proposed Spinal Morphology Extraction Agent (SEMA) estimates probability distributions over the dominant-curve region and image-coordinate direction, together with their joint configuration, from each preoperative radiograph. These morphology conditions guide Diagnosis Routed Interval Cross Attention (DRICA) in performing anisotropic and interval-dependent retrieval from a separate preoperative token stream, enabling

Figure 1: Comparisons of generative paradigms for preoperative-to-postoperative scoliosis radiograph synthesis. Direct conditional translation (a) predicts the postoperative radiograph through a single feed-forward mapping, while iterative conditional generation (b) progressively transforms noise into the target image using multiple network function evaluations. Our ViT³Flow (c) performs patient-conditioned finite-interval generation with a single network evaluation, where the Spinal Morphology Extraction Agent provides dominant-curve region and direction distributions to guide Diagnosis-Routed Interval Cross-Attention in retrieving spatially organized evidence from the preoperative radiograph.
the evolving postoperative representation to incorporate spatially organized anatomical evidence during finite-interval transport. The main contributions of this work are summarized as follows:
- We formulate postoperative scoliosis radiograph synthesis as patient-conditioned finite-interval generative transport and propose ViT³Flow, a single-NFE MeanFlow framework that integrates sample-specific token-mixing adaptation with diagnosis-routed retrieval of preoperative anatomy.
- We construct ScoliSurg, to our knowledge the first paired dataset for postoperative scoliosis radiograph synthesis, comprising 632 matched preoperative and postoperative whole-spine radiograph pairs with structured morphology information for model development and evaluation.
- We introduce the Spinal Morphology Extraction Agent to estimate probability distributions over the dominant-curve region and image-coordinate direction from preoperative radiographs. These distributions and their joint configuration enable Diagnosis Routed Interval Cross Attention (DRICA) to perform anisotropic and interval-dependent retrieval of spatially organized preoperative evidence.
- Extensive experiments on ScoliSurg demonstrate that ViT³Flow outperforms representative baselines in perceptual image quality, anatomical fidelity, and clinically relevant geometric accuracy while requiring only a single network evaluation.
Anonymous Author(s): Preprint submitted to Elsevier
Page 2 of 15
2. Related Work
2.1. Scoliosis Surgical Planning and Postoperative Prediction
Artificial intelligence (AI) has been increasingly applied to scoliosis assessment, with most studies focusing on the deformity visible in the current radiograph, including curve characterization, severity assessment, and morphological classification [9, 11]. Subsequent work has extended these applications to disease-progression assessment, complication-risk estimation [22], and prediction of selected postoperative angular or alignment measurements [23, 24]. These methods provide valuable information about the current deformity and possible clinical outcomes, but their predictions are generally expressed as classifications, probabilities, or a limited set of geometric measurements. Such outputs cannot directly represent the spatial distribution of surgical correction across vertebral levels or the complete postoperative spinal configuration.
To provide a more spatially resolved representation, generative modeling has been explored in spinal imaging. Existing studies, however, have mainly addressed transformations across imaging views or modalities, including coronal-to-sagittal radiograph synthesis [1], MRI-to-CT translation for spinal analysis [6], lumbar MRI-to-CT generation [20], and ultrasound-to-radiograph synthesis [30]. These tasks primarily alter imaging perspective, modality, or tissue contrast while generally preserving the underlying anatomical configuration. Preoperative-to-postoperative synthesis differs because it must model a surgically induced change in spinal alignment while retaining correspondence with the anatomy visible in the preoperative radiograph. Paired preoperative-postoperative data and generative studies specifically developed for postoperative scoliosis radiograph synthesis remain limited.
2.2. Generative Medical Image Translation
Medical image synthesis is commonly formulated as conditional image-to-image translation [10, 26, 28]. Pix2Pix learns paired source-to-target mappings through adversarial and reconstruction objectives [10], whereas CycleGAN enables unpaired translation through cycle-consistency constraints [31]. Registration-guided and transformer-based approaches further improve spatial correspondence and long-range feature interaction in multimodal medical translation [2, 12]. These methods provide efficient direct inference, but a single feed-forward mapping may be restrictive when the target involves large and spatially heterogeneous anatomical changes. Diffusion models offer a probabilistic alternative by progressively reversing a predefined noising process [8], while image-to-image Schrödinger bridges learn stochastic transitions between source and target distributions [15]. Although these formulations provide greater flexibility for conditional synthesis, their iterative sampling generally requires repeated network evaluations.
Flow matching formulates generation as continuous probability transport by learning an instantaneous velocity field along a prescribed probability path [14]. Samples are
generated by numerically integrating this field from the initial distribution toward the target distribution. Optimal-transport flow matching shortens the transport path and has been explored for medical image synthesis across different modalities, spatial dimensions, and conditioning settings [27]; however, accurate generation generally remains dependent on multiple evaluations of the instantaneous velocity field. MeanFlow instead learns an average velocity over a finite interval, allowing a nonzero portion of the generative trajectory to be represented within a single network evaluation and enabling single-NFE generation without distillation or a pretrained teacher [5]. This formulation provides a promising basis for improving the efficiency of medical image synthesis, but its application to conditional medical image translation remains insufficiently explored.
2.3. Test-Time Training in Visual Modeling
Transformer-based backbones have become central to visual generation because self-attention enables global interactions among spatial tokens [3]. Diffusion Transformers (DiTs) further demonstrate that transformer blocks can effectively parameterize the denoising or velocity fields of generative models [19]. In conventional DiT backbones, attention weights vary with the input, but the projection and token-mixing parameters remain fixed after training and are shared across all samples at inference time. The resulting computation is therefore input dependent at the feature level but not explicitly adapted at the parameter level to the current case. This distinction is important for postoperative synthesis, where spinal morphology, deformity configuration, and the required correction pattern can vary substantially across individuals. Under single-NFE generation, such variation must be accommodated within one evaluation of the generative backbone rather than through repeated local refinement.
Test-Time Training (TTT) was originally introduced as a self-supervised adaptation strategy that updates a model on each unlabeled test sample before prediction [25]. Subsequent work extended this idea in visual recognition by using masked autoencoding as the one-sample test-time objective, improving robustness under distribution shifts [4]. Building on this adaptation perspective, TTT reformulates token mixing as a sample-dependent online learning process. The key-value tokens of the current input are treated as an inner training set and used to update the parameters of a compact inner model, after which the adapted model is applied to the corresponding queries. ViT³ systematically develops this formulation for visual modeling through dedicated inner-training objectives and inner-model architectures, and demonstrates its effectiveness across image classification, generation, object detection, and semantic segmentation [7]. Because the inner parameters are updated separately for each visual sequence, ViT³ allows the token-processing function itself to specialize to the spatial structure of the current sample while retaining a shared outer model. This sample-specific adaptation provides a suitable mechanism for modeling inter-patient variation within a generative backbone.
Anonymous Author(s): Preprint submitted to Elsevier
Page 3 of 15
3. Method
3.1. Overview
Postoperative scoliosis radiograph synthesis involves large and spatially heterogeneous corrective changes, making it challenging to model postoperative morphology while maintaining correspondence with patient-specific preoperative anatomy. To enable efficient generation without relying on iterative refinement, ViT³Flow formulates the transformation as a finite-interval MeanFlow process, allowing the postoperative state to be generated with a single network function evaluation (NFE).
As illustrated in Fig. 2, given a preoperative radiograph , ViT³Flow generates the corresponding postoperative radiograph from Gaussian noise through a patient-conditioned finite-interval process. The Spinal Morphology Extraction Agent (SMEA) first analyzes to obtain a dominant-curve region probability vector , an image-coordinate curve-direction probability vector , and their joint distribution . During generation, the ViT³ backbone adapts token computation to the current case, while Diagnosis Routed Interval Cross Attention (DRICA) uses the morphology information together with the current interval context to retrieve spatial evidence from the preoperative radiograph and inject it into the evolving post-operative representation. The complete condition is defined as
under which the model learns the conditional postoperative distribution .
Generation starts from Gaussian noise , where . Given the current flow state , interval endpoints , and condition , ViT³Flow predicts the conditional interval-averaged velocity and updates the state as
Here . The case corresponds to the instantaneous flow-matching boundary, whereas corresponds to finite-interval generation. In the principal single-NFE setting, the complete transition is evaluated over , producing the terminal state with one network evaluation. The final postoperative prediction is obtained by denormalizing and clipping to the valid image range. The same formulation also supports optional few-step inference by partitioning the complete trajectory into multiple finite intervals.
Figure 2(b) illustrates the conditional ViT³Flow backbone. The preoperative radiograph and the current flow state are independently encoded by the condition path and current-state path to form the preoperative tokens and current tokens , respectively. Their complete definitions, including the corresponding positional embeddings, are provided in Sec. 3.3. The two token streams enter the unified backbone but serve different roles. The current tokens are sequentially processed by the ViT³ blocks to represent the
evolving postoperative state, whereas the preoperative tokens retain the spatial organization of the source anatomy and remain fixed throughout the forward pass. Within each ViT³ block, test-time training performs a sample-specific inner update on the current token sequence, allowing token computation to adapt to the current case. Two-dimensional rotary positional encoding further preserves the vertical and horizontal organization of the whole-spine token grid.
The interval endpoints and are independently embedded, and the resulting interval representations condition the adaptive normalization layers of the ViT³ blocks and provide the interval context used by DRICA. Their formal definition is provided in Sec. 3.3.
At selected backbone depths, the intermediate current tokens are passed to DRICA, where they act as queries and the fixed preoperative tokens provide keys and values. The region probabilities guide retrieval along the vertical image axis, the direction probabilities guide retrieval along the horizontal axis, and the joint distribution regulates cross-axis interaction. Global Context Retrieval further provides access to information across the complete preoperative token sequence without applying the morphology-derived spatial biases. The retrieved evidence is fused and written back to the current stream before processing continues through the subsequent ViT³ blocks. After the final block, an interval-conditioned prediction head projects the current tokens into the conditional interval-averaged velocity , which is used in the finite-interval update to obtain the state at the target endpoint.
3.2. Spinal Morphology Extraction Agent
Although the preoperative radiograph contains rich patient-specific anatomical information, the image condition alone does not explicitly identify the location and orientation of the dominant spinal curve, making morphology-aware retrieval less direct during generation. To provide structured patient-specific cues, the Spinal Morphology Extraction Agent (SMEA) analyzes only the preoperative frontal radiograph and predicts the dominant-curve region and its direction in image coordinates. The region is categorized as thoracic, thoracolumbar, or lumbar, whereas the direction is categorized as image-left or image-right according to the convexity of the dominant curve. The fixed prompt restricts the analysis to these visible preoperative attributes, requests a structured JSON response, and prohibits inference of surgical procedures or postoperative outcomes.
For the full dataset, each radiograph was initially queried times using GPT-5.5. Each query was performed as a single-turn multimodal interaction with a temperature of 0.5 and a maximum output length of 120 tokens. The valid responses were aggregated into a dominant-curve region probability vector , an image-coordinate curve-direction probability vector , and their joint region-direction distribution for case . The querying, parsing, and aggregation procedure is summarized in Algorithm 1.
For the -th valid response, let , where and denote the predicted region and direction,
Anonymous Author(s): Preprint submitted to Elsevier
Page 4 of 15

(a) Overall Framework
(b) Conditional ViT³Flow Backbone
Figure 2: Overview of the proposed ViT³Flow framework. (a) The preoperative radiograph provides the image condition and is analyzed by SMEA to obtain the dominant-curve region probability vector , image-coordinate curve-direction probability vector , and joint region-direction distribution . Starting from , ViT³Flow predicts an interval-averaged velocity and synthesizes the postoperative radiograph under the principal single-NFE setting. The dashed box illustrates the general finite-interval update . (b) The preoperative radiograph and current flow state are independently encoded into preoperative tokens and current tokens . Both streams are supplied to the unified ViT³Flow backbone: is sequentially processed by the ViT³ blocks, whereas the fixed is accessed by DRICA at selected depths. The interval embeddings condition the ViT³ blocks and provide interval context for DRICA, whose outputs update the evolving current representation before the conditional interval-averaged velocity is predicted.
respectively. Let denote the set of valid response indices obtained from the initial queries and, when necessary, at most additional retries. When is nonempty, the joint region–direction distribution is computed as
where indexes the thoracic, thoracolumbar, and lumbar regions, and indexes the image-left and image-right directions. If no valid response is obtained after the finite retry budget, is set to the uniform distribution over the six region–direction combinations. The corresponding marginal probabilities are obtained as
We denote the resulting morphology conditions by . These conditions are computed once for each preoperative radiograph and subsequently used to route source-evidence retrieval in DRICA.
3.3. ViT³Flow for Finite-Interval Generation
To address the reliance of instantaneous-velocity models on repeated network evaluations, ViT³Flow adopts a finite-interval MeanFlow formulation. Let denote
the normalized postoperative target and let . We construct a linear probability path between the postoperative target and Gaussian noise as
Here, . Accordingly, corresponds to the postoperative target, corresponds to Gaussian noise, and denotes the instantaneous velocity along the linear path.
ViT³Flow predicts the conditional interval-averaged velocity over , where . The state at the second endpoint is obtained through
For , each prediction represents the evolution across a nonzero interval rather than only the local change at a single time point, whereas corresponds to the instantaneous flow-matching boundary. Setting directly maps the initial noise state to the postoperative state with a single network function evaluation (NFE), whereas recursively applying Eq. (6) over a partitioned schedule supports optional few-step inference.
We parameterize the interval-averaged velocity using separate current-state and preoperative token streams:
Anonymous Author(s): Preprint submitted to Elsevier
Page 5 of 15 where and are independent patch encoders, and and are fixed two-dimensional positional embeddings. The current tokens are progressively transformed to represent the evolving postoperative state, whereas the preoperative tokens remain fixed and retain the spatial organization of the source anatomy.
The two interval endpoints are independently embedded as
Their sum and difference are then used to represent the current finite interval:
The summed representation conditions the adaptive normalization layers of the ViT backbone, while the pair is further encoded as the interval context supplied to DRICA.
Finite-interval generation assigns a larger portion of the noise-to-image transformation to each network evaluation, increasing the need for the backbone to adapt its computation to the morphology and current generative state of an individual case. However, conventional self-attention applies the same learned token-mixing parameters to all samples. To introduce sample-specific computation within each evaluation, the current token stream is processed by interval-conditioned ViT blocks in which self-attention is replaced by a visual test-time-training (TTT) mixer.
For input sample , the key and value representations of the current token sequence form an inner training set. A compact inner model is updated using these representations and then applied to the corresponding queries:
where denotes the shared initialization of the inner model and is the inner-update rate. The adapted parameters are used only for the current input and are reset to before processing the next sample. Consequently, the token-processing function is specialized to the current case without permanently modifying the shared backbone parameters.
The TTT mixer contains a simplified SwiGLU branch for adaptive channel-wise transformation and a depth-wise convolution branch for local spatial modeling. Both branches are updated using the current key-value sequence and subsequently evaluated on the queries. Their outputs are concatenated and projected to the original token dimension. Two-dimensional rotary positional encoding is applied to the query and key representations of the SwiGLU branch to preserve the vertical and horizontal organization of the whole-spine token grid.
At the -th backbone layer, the current representation is updated as
where denotes an interval-conditioned ViT block. At selected depths, the intermediate representation is further updated by DRICA using the fixed preoperative tokens
, the interval context, and the SMEA-derived morphology conditions. The detailed source-retrieval mechanism is presented in Sec. 3.4.
After the final backbone layer, an interval-conditioned prediction head maps the current tokens to the interval-averaged velocity:
The prediction head applies interval-conditioned normalization followed by linear projection, and Unpatchify(·) restores the token sequence to the spatial image layout. The resulting velocity has the same dimensionality as and is substituted into Eq. (6) to obtain the state at endpoint . Under single-NFE inference, the model evaluates once and obtains the postoperative state as .
Algorithm 1 SMEA extraction of morphology-based routing information
Require: Preoperative radiograph , multimodal model , fixed prompt , initial query number , retry limit
Ensure: Morphological distributions , , and
1:
2:
3:
4: for do
5:
6:
7: if and then
8: APPEND
9: end if
10: end for
11:
12: while and do
13:
14:
15: if and then
16: APPEND
17: end if
18:
19: end while
20: if then
21:
22: else
23:
24: end if
25:
26:
27: return
3.4. Diagnosis Routed Interval Cross Attention
Although finite-interval MeanFlow enables low-NFE generation and the ViT backbone adapts token computation
Anonymous Author(s): Preprint submitted to Elsevier
Page 6 of 15

Figure 3: Overview of Diagnosis Routed Interval Cross Attention (DRICA). The evolving current tokens retrieve evidence from the fixed preoperative tokens through region-guided vertical retrieval, direction-guided horizontal retrieval, joint cross-axis coupling, and diagnosis-independent global retrieval. The MeanFlow interval context controls the route scales and residual write-back before producing the updated current tokens .
to the current case, these mechanisms do not explicitly determine how the evolving representation should retrieve spatial evidence from the corresponding preoperative radiograph. Conventional global cross attention primarily relies on feature similarity and does not organize source retrieval according to the dominant-curve morphology or the current finite interval. To address this remaining limitation, we propose Diagnosis-Routed Interval Cross Attention (DRICA), which introduces morphology- and interval-dependent source retrieval into the ViT³ backbone.
As illustrated in Fig. 3, DRICA receives the evolving current tokens and the fixed preoperative tokens . The current tokens are used to construct queries, whereas the preoperative tokens provide keys and values. DRICA then constructs morphology-based and interval dependent routing controls, applies them to four complementary source-retrieval pathways, and writes the fused evidence back to the current representation before subsequent ViT³ processing.
DRICA first constructs two complementary sets of routing controls. The diagnosis router converts the SMEA-derived region probabilities, direction probabilities, and joint region direction distribution into spatial routing information. In parallel, the interval encoder transforms the MeanFlow endpoint representations into interval-dependent scales that regulate the retrieval pathways and residual write-back. Using the interval representations defined in Eq. (9), the interval context is encoded as
The context represents both the temporal positions of the two endpoints and their separation. For each attention head , the interval encoder predicts five route scales:
where and regulate the vertical and horizontal routing biases, controls the joint axial pathway, controls the overall residual write-back, and regulates the Global Context Retrieval pathway. Consequently, the contribution of the fixed morphology conditions varies according to the current MeanFlow interval.
The diagnosis router converts the dominant-curve region and direction probabilities into head-specific spatial bias profiles:
where and are learnable bias profiles associated with the vertical curve regions and horizontal curve directions, respectively. Their probability-weighted combinations provide continuous morphology-dependent routing biases rather than selecting a single hard category. The joint region-direction distribution is separately encoded as
which provides the joint morphology representation used for cross-axis interaction and per-head route fusion.
Using the morphology derived biases and interval-dependent scales, DRICA performs Region-Guided Vertical Retrieval and Direction-Guided Horizontal Retrieval:
Anonymous Author(s): Preprint submitted to Elsevier
Page 7 of 15
Here, the query representations are derived from , whereas the key and value representations are derived from . Vertical retrieval is performed independently within each image column, while horizontal retrieval is performed independently within each image row. Because the morphology profiles are introduced before the softmax operation, they alter the source-token locations receiving attention rather than merely rescaling the retrieved features afterward.
The two axial retrieval results are further coupled through the joint region direction representation. The joint embedding first produces feature-wise modulation parameters:
which are used to construct the Joint Axial Coupling pathway:
This pathway allows the joint distribution to regulate how the vertically and horizontally retrieved evidence interacts, rather than treating the two axial pathways as independent contributions.
The morphology-routed axial pathways emphasize evidence associated with the dominant spinal curve but do not provide unrestricted access to the complete preoperative representation. To complement them with broader source information, DRICA includes a Global Context Retrieval pathway:
Unlike the axial pathways, Global Context Retrieval does not apply morphology-derived spatial biases and allows each current token to retrieve evidence from the complete preoperative token sequence. Its contribution is nevertheless adaptively controlled by the interval-dependent scale during route fusion.
After the four retrieval pathways have been computed, the joint morphology embedding and interval context determine the per-head fusion weights:
The weights , , and control the relative contributions of the vertical, horizontal, and joint axial pathways, while the Global Context Retrieval contribution is controlled by .
The retrieved evidence is first fused across the different branches:
The fused evidence is then projected and written back to the current representation:
The interval-dependent scale regulates the overall amount of source evidence written into the current stream. The output projection is initialized to zero, so each DRICA block initially behaves as an identity mapping and gradually learns to introduce preoperative evidence during training. The updated tokens are then returned to the ViT backbone for subsequent processing.
3.5. Training and Inference
ViT Flow is optimized using the finite-interval Mean-Flow objective. For each sample in a mini-batch, two endpoint candidates are independently drawn using a logit-normal time sampler:
Here, , , and . The sampled variables are transformed into time values as
Thus, . The two independently sampled values are then ordered to form a valid finite interval. The upper endpoint is defined as
and the lower endpoint is defined as
This ordering guarantees . For each mini-batch of size , a subset containing randomly selected samples is assigned equal endpoints:
We set . Accordingly, approximately 75% of the training samples satisfy r = t and supervise the instantaneous flow-matching boundary, whereas the remaining 25% use nonzero intervals r < t to learn the interval-averaged MeanFlow velocity. All reported experiments use this logit-normal sampling configuration.
Along the probability path defined in Eq. (5), the total derivative of the predicted interval-averaged velocity is
The corresponding regression target is
Here, the derivative is taken along the probability path while the interval endpoint , the preoperative image, and the SMEA-derived morphology conditions are held fixed. In practice, is evaluated using a Jacobian-vector product over with tangent . For samples with , the interval term vanishes and the target reduces to the
Anonymous Author(s): Preprint submitted to Elsevier
Page 8 of 15 conventional flow-matching target ; for samples with r < t, the Jacobian-vector product provides the finite-interval correction required by the MeanFlow target.
For each sample i in a mini-batch of size B, we define the stop-gradient regression residual as
The regression error is then averaged over the image dimensions:
Here, denotes the stop-gradient operation. The adaptive sample weight is defined as
The corresponding mini-batch loss is
We set and . The detached weight rescales the contribution of each sample according to its current regression error without receiving gradients. The overall training objective is
The expectation over follows the sampling procedure in Eqs. (24)–(28).
During inference, the preoperative tokens and the SMEA-derived morphology conditions are computed once and remain fixed throughout the generation trajectory. Starting from with , we use a decreasing schedule and define the interval length as . The state is updated as
The update is applied for . Although the morphology conditions remain fixed for a given case, their effect on source retrieval varies across intervals through the interval-dependent controls in DRICA. In the principal single-NFE setting, the schedule contains only , and the postoperative state is obtained from one evaluation of . Optional few-step inference applies the same update recursively over a partitioned schedule. The final postoperative prediction is obtained by denormalizing and clipping it to the valid image range.
4. Results
4.1. Dataset and implementation details
4.1.1. Datasets
We introduce ScoliSurg, a paired imaging dataset for scoliosis corrective surgery comprising 632 matched preoperative and postoperative standing whole-spine radiograph
pairs. The data were retrospectively collected from two collaborating hospitals, together with demographic information and clinical diagnostic records. Patients were included if they had a clinically diagnosed spinal deformity, underwent corrective surgery, and had complete preoperative and postoperative imaging records. Patients with psychological disorders, trauma affecting posture or mobility, severe dermatological conditions interfering with imaging, or known oncological conditions were excluded. All radiograph pairs were screened for image quality, correct patient-level correspondence, comparable anatomical coverage, and reliable postoperative assessment by two senior spine surgeons, each with more than 10 years of clinical experience. The study protocol was approved by the institutional ethics review board, and written informed consent was obtained from all participants or their legal guardians.
4.1.2. Implementation details
We conduct all experiments on ScoliSurg using a 7:2:1 train/validation/test split. All radiographs are resized to ( ). All methods are implemented in PyTorch and optimized using the AdamW optimizer [16] with a learning rate of . ViT Flow is optimized using the adaptive finite-interval MeanFlow loss defined in Eq. (35). Models are trained for steps with a batch size of 4. For the ViT token mixer, the inner model is initialized from the learned outer parameters and independently adapted for each input sample. Following the original ViT setting, we perform a single full-batch inner update using all token key-value pairs, with a dot-product reconstruction objective and an inner-loop learning rate of 0.25. The adapted parameters are reset to the shared initialization before processing the next sample. We additionally apply 2D axial rotary positional embeddings to preserve spatial token relationships. All experiments are performed on a cloud platform equipped with four NVIDIA RTX A6000 GPUs.
4.1.3. Evaluation metrics
We evaluate image quality using peak signal-to-noise ratio (PSNR), structural similarity index measure (SSIM), and learned perceptual image patch similarity (LPIPS) [29]. Clinical accuracy is assessed using the mean absolute error (MAE) of the postoperative Cobb angle [17] and correction rate (CR) error. For each test case, the Cobb angles on the preoperative radiograph, synthesized postoperative radiograph, and corresponding ground-truth postoperative radiograph are independently measured by two senior spine surgeons following the same measurement protocol. The final Cobb angle for each radiograph is obtained by averaging the measurements from the two surgeons. The postoperative Cobb angle MAE is then calculated between the averaged measurements of the synthesized and ground-truth postoperative radiographs. CR is defined as
Anonymous Author(s): Preprint submitted to Elsevier
Page 9 of 15 where and denote the averaged manually measured preoperative and postoperative Cobb angles, respectively [13]. The CR error is calculated as the absolute difference between the CR values derived from the synthesized and ground-truth postoperative radiographs. For each test case, the absolute postoperative Cobb-angle error and CR error are calculated independently, and the reported values are summarized as mean standard deviation across all individual cases in the test set.
4.2. Comparison with State-of-the-Art Methods
4.2.1. Quantitative Comparison
Postoperative radiograph synthesis requires both faithful reconstruction of radiographic appearance and accurate representation of the surgically corrected spinal geometry. Table 1 compares ViT³Flow with multi-NFE diffusion- and flow-based models as well as single-NFE image-translation methods. The multi-NFE baselines exhibit complementary but fragmented strengths. Diffusion achieves the highest baseline PSNR of 25.81 dB, SB obtains the lowest baseline LPIPS of 0.1958, and FM provides the strongest postoperative morphology measurements, with a Cobb angle MAE of and a CR error of pp. No individual baseline, however, performs consistently well across both image-quality and morphology-related metrics. The single-NFE image-translation methods similarly provide efficient generation but show less consistent preservation of postoperative structure. RegGAN, for example, achieves a relatively low Cobb angle MAE of , but its LPIPS remains high at 0.2649, indicating that geometric accuracy does not necessarily translate into perceptually faithful reconstruction.
ViT³Flow achieves a more consistent balance between these two requirements while retaining single-NFE inference. It obtains the best result across all five metrics, reaching a PSNR of 26.79 dB and an LPIPS of 0.1828 while reducing the Cobb angle MAE and CR error to and pp, respectively. Compared with FM, the strongest baseline for postoperative morphology, ViT³Flow reduces Cobb angle MAE by 29.6% and CR error by 25.2%, while simultaneously improving PSNR from 25.42 to 26.79 dB and LPIPS from 0.2524 to 0.1828. It also surpasses the strongest baseline values separately obtained by Diffusion and SB for PSNR and LPIPS. These results show that single-NFE generation does not require sacrificing either radiographic fidelity or postoperative morphological accuracy, and that ViT³Flow provides a unified improvement over methods whose advantages are limited to individual evaluation dimensions.
4.2.2. Efficiency Comparison
As shown in Fig. 4, multi-NFE diffusion- and flow-based methods are concentrated in the low-throughput region because they repeatedly evaluate the generative network along the sampling trajectory. Although Diffusion reaches the strongest baseline PSNR of 25.81 dB, its inference speed remains substantially lower than that of the single-NFE methods. In contrast, image-translation models

Figure 4: Quality efficiency comparison on ScoliSurg. Reconstruction quality is measured by PSNR, and inference throughput is reported in frames per second (FPS) on a logarithmic scale. Multi-NFE diffusion- and flow-based methods are concentrated in the low-throughput region, whereas single-NFE image-translation methods achieve higher throughput but lower reconstruction quality. ViT³Flow reaches the highest PSNR while remaining in the high-efficiency regime.
operate at tens of frames per second but generally achieve lower reconstruction quality; RegGAN obtains the highest PSNR among these methods at 25.62 dB, while ResViT and CycleGAN reach 24.45 and 24.50 dB, respectively.
ViT³Flow achieves a more favorable quality-efficiency balance, reaching the highest PSNR of 26.79 dB while retaining single-NFE inference and high throughput. It exceeds RegGAN, the strongest single-NFE baseline in PSNR, by 1.17 dB and operates approximately one order of magnitude faster than representative multi-NFE diffusion- and flow-based methods. These results indicate that ViT³Flow improves reconstruction quality without relying on a long iterative sampling process.
4.2.3. Visual Comparison
Figure 5 presents three representative cases with different preoperative curvature patterns. In the corresponding ground-truth postoperative radiographs, the spinal axis is substantially corrected, and continuous fixation structures are visible within the highlighted regions.
Pix2Pix captures the coarse postoperative appearance but produces blurred vertebral boundaries, incomplete fixation structures, and residual curvature in several cases. ResViT better preserves the overall body contour but introduces local inconsistencies in the reconstructed spinal axis and fixation pattern. The diffusion-based model recovers part of the corrected configuration, although the highlighted regions contain discontinuous or poorly localized structural details. FM produces more apparent fixation-related features, but the surrounding vertebral and soft-tissue structures are frequently over-smoothed, and the reconstructed alignment does not consistently match the ground truth.
In contrast, ViT³Flow more closely reproduces the corrected spinal trajectory and maintains a more continuous
Anonymous Author(s): Preprint submitted to Elsevier
Page 10 of 15
Table 1
Quantitative comparison with image-translation, diffusion-based, and flow-based methods on ScoliSurg. NFE denotes the number of network function evaluations during inference. Higher PSNR and SSIM are better, while lower LPIPS, Cobb MAE, and CR error are better.
| Method | NFE | PSNR ↑ | SSIM ↑ | LPIPS ↓ | Cobb MAE (°) ↓ | CR Error (pp) ↓ |
|---|---|---|---|---|---|---|
| Multi-NFE Methods | ||||||
| Palette [21] | 1000 | 22.18 | 0.7845 | 0.2189 | ||
| [15] | 100 | 25.54 | 0.7926 | 0.1958 | ||
| Diffusion [8] | 1000 | 25.81 | 0.8237 | 0.2416 | ||
| MOTFM [27] | 10 | 24.40 | 0.8031 | 0.2223 | ||
| FM [14] | 100 | 25.42 | 0.8319 | 0.2524 | ||
| Single-NFE Methods | ||||||
| Pix2Pix [10] | 1 | 24.76 | 0.7826 | 0.2635 | ||
| CycleGAN [31] | 1 | 24.50 | 0.7833 | 0.2720 | ||
| CUT [18] | 1 | 23.34 | 0.7568 | 0.3078 | ||
| RegGAN [12] | 1 | 25.62 | 0.8015 | 0.2649 | ||
| ResViT [2] | 1 | 24.45 | 0.7790 | 0.2838 | ||
| Ours | 1 | 26.79 | 0.8641 | 0.1828 | ||
Table 2
Contribution analysis of the core components in ViT³Flow on ScoliSurg. Higher PSNR and SSIM are better, while lower LPIPS, Cobb MAE, and CR error are better.
| Variant | MeanFlow | DRICA | PSNR ↑ | SSIM ↑ | LPIPS ↓ | Cobb MAE (°) ↓ | CR Error (pp) ↓ | |
|---|---|---|---|---|---|---|---|---|
| Base | 25.42 | 0.8319 | 0.2524 | |||||
| M1 | ✓ | 25.62 | 0.8495 | 0.2311 | ||||
| M2 | ✓ | ✓ | 26.20 | 0.8596 | 0.1961 | |||
| M3 | ✓ | ✓ | 25.59 | 0.8468 | 0.2097 | |||
| Ours | ✓ | ✓ | ✓ | 26.79 | 0.8641 | 0.1828 |
fixation pattern across the three cases. The highlighted regions also show closer correspondence with the ground-truth vertebral configuration while preserving the surrounding anatomical appearance. These observations are consistent with the lower Cobb angle MAE and CR error reported in Table 1.
4.3. Ablation Study
4.3.1. Contribution of Core Components
We evaluate the individual and combined contributions of the finite-interval MeanFlow objective, the token mixer, and DRICA under the same network scale, training schedule, and inference setting. The Base model adopts conventional flow matching and standard self-attention. M1 replaces the training objective with MeanFlow, M2 further introduces the token mixer without DRICA or source-token cross-attention, and M3 combines MeanFlow with DRICA while retaining the conventional token mixer. The complete model integrates all three components.
Table 2 shows that the three components contribute to complementary aspects of postoperative radiograph synthesis. Replacing conventional flow matching with the finite-interval MeanFlow objective in M1 increases PSNR from 25.42 to 25.62 dB, improves SSIM from 0.8319 to 0.8495, reduces LPIPS from 0.2524 to 0.2311, and lowers CR error from 2.98 to 2.69 pp. These consistent improvements demonstrate the effectiveness of finite-interval supervision for learning the postoperative transformation.
The contribution of the token mixer is particularly evident in the image-quality metrics. Relative to M1, M2 increases PSNR from 25.62 to 26.20 dB, improves SSIM from 0.8495 to 0.8596, and reduces LPIPS from 0.2311 to 0.1961. These gains show that test-time-training token dynamics strengthens the representation of the evolving postoperative state and improves radiographic reconstruction quality.
DRICA provides a complementary improvement in morphology related accuracy. Compared with M1, M3 reduces Cobb angle MAE from to and improves LPIPS from 0.2311 to 0.2097. This pattern highlights the value of structured retrieval from the preoperative
Anonymous Author(s): Preprint submitted to Elsevier
Page 11 of 15

Figure 5: Qualitative comparison of postoperative scoliosis radiograph synthesis on three representative cases. From left to right: preoperative input, postoperative ground truth (GT), ViT³Flow prediction, Pix2Pix, ResViT, diffusion-based model, and flow-matching model (FM). The yellow boxes highlight the principal correction and fixation regions. ViT³Flow more closely reproduces the corrected spinal trajectory and the continuity of postoperative fixation structures while preserving the surrounding anatomical appearance.
token stream for maintaining patient-specific anatomical correspondence during postoperative synthesis.
Integrating MeanFlow, ViT³, and DRICA produces the best performance across all five metrics. The complete model reaches a PSNR of 26.79 dB, an SSIM of 0.8641, and an LPIPS of 0.1828, while further reducing Cobb angle MAE and CR error to 1.07 ± 2.30° and 2.23 ± 4.71 pp, respectively. These results demonstrate a complementary relationship among the three components: MeanFlow supports efficient finite-interval generation, ViT³ enhances test-time-training token dynamics, and DRICA introduces spatially organized preoperative evidence into the evolving postoperative representation.
4.3.2. Analysis of DRICA Routing Mechanisms
We further analyze the contributions of Global Context Retrieval, axial retrieval, SMEA-guided morphology routing, interval-dependent modulation, and joint axial coupling within DRICA. All variants use the same MeanFlow objective and ViT³ backbone. R1 retains the DRICA insertion structure but uses only Global Context Retrieval from the evolving current tokens to the complete preoperative token sequence, while R2 further introduces axial decomposition. R3–R5 retain both the global and axial retrieval pathways but individually remove the morphology guidance provided by the Spinal Morphology Extraction Agent (SMEA), interval-dependent modulation, and joint axial coupling from the complete configuration in R6, respectively. Specifically, SMEA extracts the dominant-curve region and direction distributions that guide the spatial routing of preoperative evidence in DRICA. R1 also differs
from M2 in Table 2: M2 does not use SMEA or source-token cross-attention and instead incorporates only a pooled preoperative condition through adaptive layer normalization (AdaLN).
Comparisons across R1-R6 demonstrate the complementary roles of the DRICA routing mechanisms. Relative to the global-only retrieval in R1, introducing axial decomposition in R2 increases PSNR from 25.23 to 25.41 dB, reduces LPIPS from 0.2102 to 0.2035, and lowers Cobb angle MAE from 2.58 ± 2.81° to 2.17 ± 3.29°, showing the benefit of organizing preoperative evidence retrieval along the vertical and horizontal axes of the whole-spine image. The SMEA-derived morphology conditions provide further patient-specific guidance: compared with R3, which excludes the region and direction distributions, the complete configuration R6 improves PSNR from 26.46 to 26.79 dB, reduces LPIPS from 0.1975 to 0.1828, and lowers Cobb angle MAE from 2.01 ± 3.73° to 1.07 ± 2.30°.
Interval-dependent modulation and joint axial coupling contribute additional complementary improvements. Compared with R4, R6 improves all five metrics and reduces the mean CR error from 3.56 to 2.23 pp, supporting the use of MeanFlow interval context to regulate route scales and source-evidence write-back. Compared with R5, introducing joint axial coupling improves PSNR from 26.28 to 26.79 dB, SSIM from 0.8505 to 0.8641, and LPIPS from 0.1893 to 0.1828, while reducing Cobb angle MAE from 1.46 ± 4.08° to 1.07 ± 2.30°. Overall, R6 combines global access, axial organization, SMEA-guided morphology routing, interval modulation, and cross-axis interaction, achieving the best performance across all image-quality and morphology-related metrics.
4.4. Clinical Correlation and Agreement Analysis
To assess whether the synthesized radiographs preserve clinically relevant postoperative spinal curvature, we compare the Cobb angles measured from the synthesized images with those measured from the corresponding ground-truth postoperative radiographs. Pearson and Spearman correlation analyses are used to evaluate the association between the paired measurements, while Bland–Altman analysis quantifies their mean difference and 95% limits of agreement.
As shown in Fig. 6, ViT³Flow demonstrates the strongest association with the ground-truth postoperative Cobb angle measurements, achieving , , and , together with the lowest absolute angular error of . These results indicate that the Cobb angles measured from the synthesized radiographs closely follow the variation observed in the corresponding postoperative measurements.
The Bland–Altman analysis further shows that ViT³Flow has a mean measurement difference of 0.15°, with 95% limits of agreement ranging from -4.82° to 5.12°. These limits are narrower than those of the competing methods. For example, FM yields limits of agreement from -7.37° to 7.84° and a lower Pearson correlation of . Overall, ViT³Flow achieves stronger correlation and closer
Anonymous Author(s): Preprint submitted to Elsevier
Page 12 of 15
Table 3 Analysis of the routing mechanisms in Diagnosis Routed Interval Cross Attention (DRICA). Higher PSNR and SSIM are better, while lower LPIPS, Cobb MAE, and CR error are better.
| Variant | Global Ctx. | Axial | Morph. | Interval | Joint | PSNR ↑ | SSIM ↑ | LPIPS ↓ | Cobb MAE (°) ↓ | CR Error (pp) ↓ |
|---|---|---|---|---|---|---|---|---|---|---|
| R1 | ✓ | 25.23 | 0.8394 | 0.2102 | 2.58±2.81 | 3.88±2.75 | ||||
| R2 | ✓ | ✓ | 25.41 | 0.8355 | 0.2035 | 2.17±3.29 | 3.77±2.82 | |||
| R3 | ✓ | ✓ | ✓ | ✓ | 26.46 | 0.8461 | 0.1975 | 2.01±3.73 | 2.55±2.58 | |
| R4 | ✓ | ✓ | ✓ | ✓ | 26.42 | 0.8544 | 0.1969 | 2.03±3.02 | 3.56±3.06 | |
| R5 | ✓ | ✓ | ✓ | ✓ | 26.28 | 0.8505 | 0.1893 | 1.46±4.08 | 2.47±2.47 | |
| R6 | ✓ | ✓ | ✓ | ✓ | ✓ | 26.79 | 0.8641 | 0.1828 | 1.07±2.30 | 2.23±4.71 |

(a) Pix2Pix (Abs. error 5.70±4.86°)
(b) ResViT (Abs. error 4.90±6.05°)
(c) Diffusion (Abs. error 2.85±3.95°)
(d) FM (Abs. error 1.52±3.57°)
(e) Ours (Abs. error 1.07±2.30°)
Figure 6: Clinical correlation and agreement analysis of postoperative Cobb angle measurements for Pix2Pix, ResViT, Diffusion, FM, and ViT³Flow. For each method, the correlation plot compares the predicted and ground-truth postoperative Cobb angles. The dashed diagonal line denotes the identity line, while the solid colored line denotes the fitted regression line. Pearson correlation coefficient (), coefficient of determination (), and Spearman correlation coefficient () are reported in each plot, and the corresponding absolute angular error is shown below each method. The adjacent Bland-Altman plot presents the difference between the predicted and ground-truth Cobb angles against their paired mean. The solid horizontal line indicates the mean difference, and the dashed horizontal lines indicate the 95% limits of agreement.
agreement with ground-truth Cobb angle measurements, supporting its ability to preserve clinically relevant postoperative spinal morphology.
5. Discussion
This study presents ViT³Flow for efficient postoperative scoliosis radiograph synthesis. The proposed framework integrates finite-interval MeanFlow generation, test-time-training token dynamics, and diagnosis-routed retrieval
Anonymous Author(s): Preprint submitted to Elsevier
Page 13 of 15 of preoperative evidence. Evaluations based on conventional image-quality metrics and postoperative Cobb angle measurements demonstrate that ViT³Flow improves radiographic fidelity and morphological accuracy under single-NFE inference. Ablation studies on the main framework components and the internal routing mechanisms of DRICA further show that finite-interval generation, test-time-training token dynamics, and diagnosis-routed retrieval provide complementary improvements.
Two factors are particularly important for postoperative radiograph synthesis. The first is the efficient modeling of large corrective changes. Conventional diffusion- and bridge-based methods approximate the generative trajectory through multiple local updates, resulting in greater inference cost and potentially reduced structural accuracy when the number of sampling steps is substantially decreased. ViT³Flow instead predicts an interval-averaged velocity over a nonzero transport interval, allowing a single network evaluation to represent a larger portion of the transformation from noise to the postoperative state. Comparisons with both multi-NFE and single-NFE baselines show that this formulation achieves a favorable balance between synthesis quality and inference efficiency.
The second factor is the selective use of preoperative anatomy. Surgical correction substantially alters spinal alignment, whereas vertebral appearance and surrounding anatomical structures should remain consistent with the individual patient. Global conditioning alone may not adequately distinguish regions requiring substantial correction from structures whose anatomical identity should be retained. In ViT³Flow, the ViT³ mixer adapts token interactions to the current case, while DRICA retrieves spatially corresponding evidence from a separate preoperative token stream according to the dominant-curve distributions and transport interval. The ablation results support these complementary roles: test-time-training token dynamics mainly improves radiographic reconstruction, whereas source-evidence retrieval provides additional gains in postoperative morphological accuracy. Their integration yields the strongest overall performance across image quality and clinically relevant geometric measurements.
From a clinical perspective, ViT³Flow provides an image-level estimate of postoperative spinal morphology from the available preoperative radiograph. By representing the spatial distribution of correction across the complete radiograph, the synthesized result may complement conventional scalar outcome estimates and support postoperative alignment assessment, correction analysis, and outcome evaluation. Incorporating operative information, such as the planned correction strategy and target alignment, may further improve the specificity and controllability of future models.
The present study has several limitations. ScoliSurg was retrospectively collected in a single clinical setting, and external validation on data from additional institutions is required to assess generalizability. Moreover, the current
evaluation focuses on two-dimensional radiographic morphology and selected image-quality and geometric measurements. Future work will expand the dataset across clinical centers, incorporate surgical conditions, and investigate the utility of synthesized radiographs in downstream quantitative and clinical assessment tasks.
6. Conclusion
In this paper, we introduce ScoliSurg, a paired dataset for postoperative scoliosis radiograph synthesis, and propose ViT³Flow, a single-NFE framework for generating postoperative radiographs from preoperative images. ViT³Flow formulates the task as patient-conditioned finite-interval transport and combines MeanFlow with sample-adaptive token computation and structured retrieval of preoperative anatomy. The Spinal Morphology Extraction Agent extracts distributions of dominant-curve region and direction from the preoperative radiograph, which guide Diagnosis Routed Interval Cross Attention (DRICA) in retrieving spatially corresponding source evidence, while the ViT³ token mixer adapts its computation to the morphology of each case.
Experiments on ScoliSurg show that ViT³Flow achieves strong radiographic fidelity and postoperative morphological accuracy with a single network evaluation, outperforming representative direct-translation, diffusion-, bridge-, and flow-based baselines. Ablation studies further demonstrate the distinct and complementary roles of finite-interval generation, sample-specific token adaptation, and diagnosis-routed source retrieval. These results establish the feasibility of efficient postoperative radiograph synthesis. Future work will extend the evaluation to multi-center cohorts, incorporate planned surgical variables to improve generation specificity and controllability, and assess the utility of synthesized radiographs for quantitative postoperative analysis and clinical decision support.
References
[1] Bassani, T., Cina, A., Galbusera, F., Cazzato, A., Pellegrino, M.E., Albano, D., Sconfienza, L.M., 2025. Feasibility of generating sagittal radiographs from coronal views using GAN-based deep learning framework in adolescent idiopathic scoliosis. European Radiology Experimental 9, 11. URL: https://doi.org/10.1186/s41747-025-00553-6, doi:10.1186/s41747-025-00553-6.
[2] Dalmaz, O., Yurt, M., Cukur, T., 2022. Resvit: Residual vision transformers for multimodal medical image synthesis. IEEE Transactions on Medical Imaging 41, 2598–2614. URL: https://doi.org/10.1109/TMI.2022.3167808, doi:10.1109/TMI.2022.3167808.
[3] Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., Uszkoreit, J., Houlsby, N., 2021. An image is worth 16x16 words: Transformers for image recognition at scale. URL: https://openreview.net/forum?id=YicbFdNTty, international Conference on Learning Representations (ICLR).
[4] Gandelsman, Y., Sun, Y., Chen, X., Efros, A.A., 2022. Test-time training with masked autoencoders, in: Advances in Neural Information Processing Systems, pp. 29374–29385. URL: https://openreview.net/forum?id=SHM1b7sjXk.
[5] Geng, Z., Deng, M., Bai, X., Kolter, J.Z., He, K., 2025. Mean flows for one-step generative modeling. URL: https://arxiv.org/abs/2505.13447, arXiv:2505.13447.
Anonymous Author(s): Preprint submitted to Elsevier
Page 14 of 15
[6] Graf, R., Schmitt, J., Schlaeger, S., Möller, H.K., Sideri-Lampretsa, V., Sekuboyina, A., Krieg, S.M., Wiestler, B., et al., 2023. Denoising diffusion-based MRI to CT image translation enables automated spinal segmentation. European Radiology Experimental 7, 70. URL: https://doi.org/10.1186/s41747-023-00385-2, doi:10.1186/s41747-023-00385-2.
[7] Han, D., Li, Y., Li, T., Cao, Z., Wang, Z., Song, J., Cheng, Y., Zheng, B., Huang, G., 2026. Vit : Unlocking test-time training in vision. URL: https://arxiv.org/abs/2512.01643, arXiv:2512.01643.
[8] Ho, J., Jain, A., Abbeel, P., 2020. Denoising diffusion probabilistic models. URL: https://arxiv.org/abs/2006.11239, arXiv:2006.11239.
[9] Hornung, A.L., Hornung, C.M., Mallow, G.M., Barajas, J.N., Rush, A., Sayari, A.J., Galbusera, F., Wilke, H.J., et al., 2022. Artificial intelligence in spine care: current applications and future utility. European Spine Journal 31, 2057–2081. URL: https://doi.org/10.1007/s00586-022-07176-0, doi:10.1007/s00586-022-07176-0.
[10] Isola, P., Zhu, J.Y., Zhou, T., Efros, A.A., 2018. Image-to-image translation with conditional adversarial networks. URL: https://arxiv.org/abs/1611.07004, arXiv:1611.07004.
[11] Kadoury, S., Mandel, W., Roy-Beaudry, M., Nault, M.L., Parent, S., 2017. 3-d morphology prediction of progressive spinal deformities from probabilistic modeling of discriminant manifolds. IEEE Transactions on Medical Imaging 36, 1194–1204. URL: https://doi.org/10.1109/TMI.2017.2657225, doi:10.1109/TMI.2017.2657225.
[12] Kong, L., Lian, C., Huang, D., Hu, Y., Zhou, Q., et al., 2021. Breaking the dilemma of medical image-to-image translation, in: Advances in Neural Information Processing Systems, pp. 1964–1978. URL: https://proceedings.neurips.cc/paper/2021/hash/0bca8d2946e1b2a4d8f0c98f9f0ad8d9-Abstract.html.
[13] Langensiepen, S., Semler, O., Sobottke, R., Fricke, O., Franklin, J., Schönau, E., Eysel, P., 2013. Measuring procedures to determine the cobb angle in idiopathic scoliosis: a systematic review. European Spine Journal 22, 2360–2371. URL: https://doi.org/10.1007/s00586-013-2693-9, doi:10.1007/s00586-013-2693-9.
[14] Lipman, Y., Chen, R.T.Q., Ben-Hamu, H., Nickel, M., Le, M., 2023. Flow matching for generative modeling. URL: https://arxiv.org/abs/2210.02747, arXiv:2210.02747.
[15] Liu, G.H., Vahdat, A., Huang, D.A., Theodorou, E., Nie, W., Anand-kumar, A., 2023. I²SB: Image-to-image schrödinger bridge, in: Proceedings of the 40th International Conference on Machine Learning, pp. 22042–22062. URL: https://proceedings.mlr.press/v202/liu23ai.html.
[16] Loschilov, I., Hutter, F., 2019. Adamw weight decay regularization. URL: https://arxiv.org/abs/1711.05101, arXiv:1711.05101. international Conference on Learning Representations (ICLR).
[17] Nowitzke, A., Wood, M., Cooney, K., 2008. Improving accuracy and reducing errors in spinal surgery—a new technique for thoracolumbar-level localization using computer-assisted image guidance. The Spine Journal 8, 597–604.
[18] Park, T., Efros, A.A., Zhang, R., Zhu, J.Y., 2020. Contrastive learning for unpaired image-to-image translation, in: European conference on computer vision, Springer, pp. 319–345.
[19] Peebles, W., Xie, S., 2023. Scalable diffusion models with transformers. URL: https://arxiv.org/abs/2212.09748, arXiv:2212.09748.
[20] Roberts, M., Hinton, G., Wells, A.J., Van Der Veken, J., Bajger, M., Lee, G., Liu, Y., Chong, C., et al., 2023. Imaging evaluation of a proposed 3d generative model for MRI to CT translation in the lumbar spine. The Spine Journal 23, 1602–1612. URL: https://doi.org/10.1016/j.spinee.2023.06.399, doi:10.1016/j.spinee.2023.06.399.
[21] Saharia, C., Lee, C.A., Fleet, D.J., Chang, H., Ho, J., Norouzi, M., Salimans, T., Chan, W., 2022. Palette: Image-to-image diffusion models, in: ACM SIGGRAPH 2022 Conference Proceedings. URL: https://doi.org/10.1145/3528233.3530757, doi:10.1145/3528233.3530757.
[22] Scheer, J.K., Smith, J.S., Schwab, F., Lafage, V., Shaffrey, C.I., Bess, S., Daniels, A.H., Hart, R.A., et al., 2017. Development of a preoperative predictive model for major complications following adult spinal deformity surgery. Journal of Neurosurgery: Spine 26, 736–743. URL: https://doi.org/10.3171/2016.10.SPINE16197,
doi:10.3171/2016.10.SPINE16197.
[23] Schönngel, L., Caffard, T., Vu-Han, T.L., Zhu, J., Nathoo, I., Finos, K., Camino-Willhuber, G., Tani, S., et al., 2024. Predicting postoperative outcomes in lumbar spinal fusion: development of a machine learning model. The Spine Journal 24, 239–249. URL: https://doi.org/10.1016/j.spinee.2023.09.029, doi:10.1016/j.spinee.2023.09.029.
[24] Sigurdarson, H., Joshi, A., Mohebi, A., Hassanzadeh, H., 2025. Applications and quality assurance of artificial intelligence in adult spinal deformity surgery. Artificial Intelligence Surgery 5, 283–297. URL: https://doi.org/10.20517/ais.2024.35, doi:10.20517/ais.2024.35.
[25] Sun, Y., Wang, X., Liu, Z., Miller, J., Efros, A.A., Hardt, M., 2020. Test-time training with self-supervision for generalization under distribution shifts, in: Proceedings of the 37th International Conference on Machine Learning, PMLR. pp. 9229–9248. URL: https://proceedings.mlr.press/v119/sun20b.html.
[26] Wang, H., Xing, Z., Wu, W., Yang, Y., Tang, Q., Zhang, M., Xu, Y., Zhu, L., 2024. Non-invasive to invasive: Enhancing ffa synthesis from cfp with a benchmark dataset and a novel network, in: Proceedings of the 1st International Workshop on Multimedia Computing for Health and Medicine, pp. 7–15.
[27] Yazdani, M., Medghalchi, Y., Ashrafian, P., Hacihaliloglu, I., Shahriari, D., 2025. Flow matching for medical image synthesis: Bridging the gap between speed and quality, in: International Conference on Medical Image Computing and Computer-Assisted Intervention, Springer. pp. 216–226.
[28] Yu, C., Fang, H., Wang, H., Deng, T., Du, Q., Xu, Y., Yang, W., 2024. Rethinking diffusion-based image generators for fundus fluorescein angiography synthesis on limited data. arXiv preprint arXiv:2412.12778.
[29] Zhang, R., Isola, P., Efros, A.A., Shechtman, E., Wang, O., 2018. The unreasonable effectiveness of deep features as a perceptual metric, in: Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 586–595.
[30] Zhou, Y., Wu, C., Wang, X., Zheng, Y., 2023. Uxdiff: Synthesis of x-ray image from ultrasound coronal image of spine with diffusion probabilistic network, in: Medical Image Computing and Computer Assisted Intervention – MICCAI 2023, pp. 3–12. URL: https://doi.org/10.1007/978-3-031-43996-4_1, doi:10.1007/978-3-031-43996-4_1.
[31] Zhu, J.Y., Park, T., Isola, P., Efros, A.A., 2020. Unpaired image-to-image translation using cycle-consistent adversarial networks. URL: https://arxiv.org/abs/1703.10593, arXiv:1703.10593.
Anonymous Author(s): Preprint submitted to Elsevier
Page 15 of 15