Papers
Topics
Authors
Recent
Search
2000 character limit reached

Treatment-Aware Spatio-Temporal Diffusion Models

Updated 8 July 2026
  • The paper presents two formulations of treatment-aware diffusion models, one using causal patch selection and the other leveraging treatment embeddings for clinical forecasting.
  • It employs selective inpainting and diffusion sampling to disentangle causal regions from environmental noise, thereby reducing computational complexity and mitigating spurious correlations.
  • Empirical results on diverse benchmarks and MS datasets validate the models’ capability in both generic prediction tasks and personalized counterfactual medical forecasting.

Searching arXiv for the specified papers and closely related work on treatment-aware spatio-temporal diffusion. Treatment-aware spatio-temporal diffusion models are generative frameworks that integrate spatio-temporal forecasting with explicit conditioning on interventions, treatments, or causally salient regions. In the literature represented here, the term covers two distinct but related formulations. One formulation treats selected spatio-temporal patches as “treatment” or causal patches and models the remaining regions as environmental or non-causal variables to be inpainted with a diffusion prior, as in CaPaint for spatio-temporal prediction (Duan et al., 2024). The other formulation conditions a spatio-temporal diffusion process on clinical treatment assignments and longitudinal imaging features in order to generate future lesion masks under specific therapies, as in forecasting future multiple sclerosis lesion masks conditioned on treatments (Favero et al., 9 Aug 2025). Taken together, these works place diffusion modeling inside a causal or intervention-aware setup, with treatment-awareness arising either from causal partitioning of input regions or from explicit therapy embeddings.

1. Conceptual scope and problem setting

In CaPaint, the observed object is a historical spatio-temporal sequence X1,,XTX_1,\dots,X_T with XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}, and the task is to predict the next KK frames Y:={XT+1,,XT+K}Y:=\{X_{T+1},\dots,X_{T+K}\} (Duan et al., 2024). The central causal assumption is that each frame can be decomposed into two disjoint sets of patches, Xt=[Xtc;Xte]X_t=[X_t^c;X_t^e], where XtcX_t^c denotes “treatment” or causal patches that genuinely drive YY, and XteX_t^e denotes “environmental” or non-causal patches that induce spurious correlations. The simplified structural causal model is stated as Xt{Xtc,Xte}YX_t \to \{X_t^c,X_t^e\}\to Y with XteYX_t^e \nrightarrow Y in the sense that its contribution is only spurious (Duan et al., 2024).

In the multiple sclerosis forecasting model, the target is a future NET2 lesion mask at a target visit XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}0, conditioned on MRI visits at pre-treatment XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}1 and interim XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}2, together with treatment information (Favero et al., 9 Aug 2025). The model follows the Variational Diffusion Model formalism with a forward noising process XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}3 and a learned reverse denoising process XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}4. The clean target is a NET2 label volume XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}5, where XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}6 axial slices, converted into a pseudo-2D tensor by folding the slice dimension into the channel axis (Favero et al., 9 Aug 2025).

These two formulations instantiate treatment-awareness differently. In CaPaint, “treatment” refers to causal spatio-temporal regions selected from the observed sequence. In the multiple sclerosis model, treatment refers to the patient’s treatment arm among six categories plus a null category for classifier-free dropout (Favero et al., 9 Aug 2025). A plausible implication is that “treatment-aware spatio-temporal diffusion model” is not a single canonical architecture, but a family of models in which the diffusion process is conditioned on intervention-relevant structure.

2. Causal formulation and treatment semantics

CaPaint is explicitly framed in causal terms. After identifying XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}7 and XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}8, the conceptual starting point is the back-door formula

XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}9

Operationally, this is approximated by masking out KK0, generating multiple samples KK1 from its marginal, and averaging: KK2 The paper notes that NuwaDynamics enumerates exponentially many environmental configurations, whereas CaPaint uses front-door adjustment to avoid that cost, although the back-door formula remains the conceptual starting point (Duan et al., 2024).

The multiple sclerosis model is treatment-aware through direct conditioning rather than through a patchwise causal partition. Its conditioning variable is

KK3

where KK4 is a learned embedding of the patient’s treatment arm and KK5 is the feature map output of a frozen encoder processing the multi-modal MRI volumes KK6 comprising FLAIR, T2, and Gd-enhanced data (Favero et al., 9 Aug 2025). Counterfactual generation is performed by varying KK7 while keeping KK8 fixed, thereby producing future NET2 masks under different therapies (Favero et al., 9 Aug 2025).

The contrast between these formulations is methodologically important. In one case, treatment is an internal latent partition of the observed field into causal and environmental regions; in the other, treatment is an externally assigned intervention represented as a discrete arm. This suggests that treatment-awareness in spatio-temporal diffusion can be grounded either in causal discovery over the input domain or in interventional covariates supplied by the application domain.

3. Identification and conditioning mechanisms

CaPaint identifies causal versus non-causal regions with a Vision Transformer backbone trained on a self-supervised spatio-temporal reconstruction task: KK9 Per-patch multi-head attention is extracted at each layer,

Y:={XT+1,,XT+K}Y:=\{X_{T+1},\dots,X_{T+K}\}0

and aggregated across heads and query positions into an importance score

Y:={XT+1,,XT+K}Y:=\{X_{T+1},\dots,X_{T+K}\}1

The Y:={XT+1,,XT+K}Y:=\{X_{T+1},\dots,X_{T+K}\}2 patches are ranked by Y:={XT+1,,XT+K}Y:=\{X_{T+1},\dots,X_{T+K}\}3, and the top Y:={XT+1,,XT+K}Y:=\{X_{T+1},\dots,X_{T+K}\}4 are deemed causal Y:={XT+1,,XT+K}Y:=\{X_{T+1},\dots,X_{T+K}\}5, while the remainder Y:={XT+1,,XT+K}Y:=\{X_{T+1},\dots,X_{T+K}\}6 are treated as non-causal (Duan et al., 2024). The resulting binary mask Y:={XT+1,,XT+K}Y:=\{X_{T+1},\dots,X_{T+K}\}7 is then used during diffusion inpainting and later data augmentation.

The multiple sclerosis model uses two conditioning channels. First, treatment embedding is defined by a standard lookup

Y:={XT+1,,XT+K}Y:=\{X_{T+1},\dots,X_{T+K}\}8

with Y:={XT+1,,XT+K}Y:=\{X_{T+1},\dots,X_{T+K}\}9 indexing placebo, NE, LE, MiE, MoE, and HE (Favero et al., 9 Aug 2025). This embedding is summed with a time-step embedding Xt=[Xtc;Xte]X_t=[X_t^c;X_t^e]0, and the result Xt=[Xtc;Xte]X_t=[X_t^c;X_t^e]1 is injected into every ResBlock of the U-Net via learned linear layers (Favero et al., 9 Aug 2025).

Second, image conditioning is introduced through ControlNet fusion. The ControlNet is described as a frozen copy of the Stage-1 diffusion encoder, fine-tuned to process the concatenated pseudo-2D slices of Xt=[Xtc;Xte]X_t=[X_t^c;X_t^e]2. At each U-Net resolution Xt=[Xtc;Xte]X_t=[X_t^c;X_t^e]3, the ControlNet feature map Xt=[Xtc;Xte]X_t=[X_t^c;X_t^e]4 is merged into the main U-Net feature map Xt=[Xtc;Xte]X_t=[X_t^c;X_t^e]5 via a zero-initialized Xt=[Xtc;Xte]X_t=[X_t^c;X_t^e]6 convolution: Xt=[Xtc;Xte]X_t=[X_t^c;X_t^e]7 Because the convolution is zero-initialized, the network can gradually learn to attend to image conditioning without disturbing the pre-trained diffusion prior (Favero et al., 9 Aug 2025).

A common element across both systems is selective conditioning. CaPaint conditions on a mask that distinguishes causal from environmental patches. The multiple sclerosis model conditions on both therapy assignment and longitudinal imaging. In both cases, the diffusion model is not merely unconditional generation over spatio-temporal data; it is constrained by variables intended to encode intervention-relevant structure.

4. Diffusion architecture and sampling procedures

CaPaint adopts an unconditional DDPM Xt=[Xtc;Xte]X_t=[X_t^c;X_t^e]8 pretrained on ImageNet or spatio-temporal snapshots and fine-tunes it on spatio-temporal frames Xt=[Xtc;Xte]X_t=[X_t^c;X_t^e]9 (Duan et al., 2024). The denoising objective is

XtcX_t^c0

where XtcX_t^c1 is the causal mask encoding XtcX_t^c2 location (Duan et al., 2024). At sampling time, two sub-images are maintained: XtcX_t^c3, targeting the causal patches and kept anchored to the original XtcX_t^c4, and XtcX_t^c5, targeting the environmental patches and re-sampled via the learned denoiser (Duan et al., 2024). For each diffusion step XtcX_t^c6, the causal branch is updated by

XtcX_t^c7

the environmental branch by

XtcX_t^c8

and the result is merged using the binary mask XtcX_t^c9: YY0 The stated purpose is to inpaint only the spurious region while respecting the treatment region (Duan et al., 2024).

The multiple sclerosis model uses a forward diffusion process

YY1

or equivalently

YY2

with YY3 and YY4 (Favero et al., 9 Aug 2025). The reverse process is

YY5

where the mean is produced by a U-Net denoiser (Favero et al., 9 Aug 2025).

The U-Net backbone uses 6 down-sampling stages and 6 up-sampling stages, with optional self-attention at spatial resolutions YY6 and YY7 (Favero et al., 9 Aug 2025). Input NET2 masks and MRI volumes of shape YY8 are reshaped to YY9, with XteX_t^e0 axial slices folded into channels (Favero et al., 9 Aug 2025). The final output predicts the noise XteX_t^e1 with shape XteX_t^e2 (Favero et al., 9 Aug 2025).

At inference, classifier-free guidance is applied: XteX_t^e3 where XteX_t^e4 denotes both embeddings dropped out (Favero et al., 9 Aug 2025). The sampling loop is a standard DDPM sampler initialized with XteX_t^e5, and multiple draws, for example 100, yield an ensemble of plausible futures whose mean or heatmap summarizes uncertainty (Favero et al., 9 Aug 2025).

5. Training strategy, augmentation, and computational properties

CaPaint is organized as a unified causal-diffusion pipeline. Historical frames XteX_t^e6 are divided into patches; ViT self-attention produces importance vectors; causal and non-causal indices XteX_t^e7 are extracted to build masks XteX_t^e8; a DDPM is fine-tuned on XteX_t^e9 with mask side information; diffusion inpainting is run for each sequence replicate Xt{Xtc,Xte}YX_t \to \{X_t^c,X_t^e\}\to Y0 to produce augmented sequences Xt{Xtc,Xte}YX_t \to \{X_t^c,X_t^e\}\to Y1; original and augmented sequences are mixed with sampling probability Xt{Xtc,Xte}YX_t \to \{X_t^c,X_t^e\}\to Y2 per time step into the training set; any spatio-temporal predictor Xt{Xtc,Xte}YX_t \to \{X_t^c,X_t^e\}\to Y3 is trained on this mixture; and at test time only Xt{Xtc,Xte}YX_t \to \{X_t^c,X_t^e\}\to Y4 on the original Xt{Xtc,Xte}YX_t \to \{X_t^c,X_t^e\}\to Y5 is used (Duan et al., 2024). The model is therefore not solely a forecaster but also an augmentation mechanism for downstream predictors.

A central claim of CaPaint concerns complexity. NuwaDynamics’ back-door procedure is stated to require exploring Xt{Xtc,Xte}YX_t \to \{X_t^c,X_t^e\}\to Y6 combinations of environmental patches, which is exponential in Xt{Xtc,Xte}YX_t \to \{X_t^c,X_t^e\}\to Y7, whereas CaPaint runs one diffusion pass per time step with Xt{Xtc,Xte}YX_t \to \{X_t^c,X_t^e\}\to Y8 arithmetic operations, or Xt{Xtc,Xte}YX_t \to \{X_t^c,X_t^e\}\to Y9 with XteYX_t^e \nrightarrow Y0 replicates; because XteYX_t^e \nrightarrow Y1, the method remains quasi-linear (Duan et al., 2024). The paper characterizes this as reducing data generation complexity from exponential to quasi-linear levels (Duan et al., 2024).

The multiple sclerosis model uses a two-stage training strategy. Stage 1 pre-trains a diffusion prior on NET2 labels with

XteYX_t^e \nrightarrow Y2

with XteYX_t^e \nrightarrow Y3 sampled from an interpolated-shifted cosine schedule and min-SNR weighting XteYX_t^e \nrightarrow Y4 (Favero et al., 9 Aug 2025). Stage 2 freezes the U-Net prior and trains only the ControlNet zero-convs using

XteYX_t^e \nrightarrow Y5

(Favero et al., 9 Aug 2025).

Because NET2 lesions occupy XteYX_t^e \nrightarrow Y6 of voxels, lesion voxels are up-weighted by factor 10 in the MSE using XteYX_t^e \nrightarrow Y7 (Favero et al., 9 Aug 2025). During Stage 1, XteYX_t^e \nrightarrow Y8 is dropped 10% of the time to enable classifier-free guidance; during Stage 2, XteYX_t^e \nrightarrow Y9 and/or XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}00 are each dropped 10% of the time (Favero et al., 9 Aug 2025).

6. Empirical results and application domains

CaPaint is evaluated on five real-world spatio-temporal benchmarks: TaxiBJXtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}01, KTH, SEVIR, DRS, and FireSys (Duan et al., 2024). The reported backbones are ConvLSTM, PredRNN-V2, ViT, MAU, SimVP, Mmvp, and EarthFarsser, and the metrics are MAE, MSE, and SSIM (Duan et al., 2024). The reported gains across combinations are 3.7%–77.3% relative improvement, with examples including an MSE drop from XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}02 on DRS and an MAE drop from XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}03 (Duan et al., 2024). In data-scarce regimes using 10%, 25%, and 50% of the data, the model yields the largest SSIM gains when data are few; in comparisons against Flip, Rotate, Crop, and Nuwa mix-up, only CaPaint improves MAE consistently on all five benchmarks (Duan et al., 2024).

The multiple sclerosis model is evaluated on a multi-centre dataset of 2131 patient 3D MRIs from randomized clinical trials for relapsing-remitting MS across six different treatments (Favero et al., 9 Aug 2025). It is described as the first treatment-aware spatio-temporal diffusion model able to generate future masks demonstrating lesion evolution in MS (Favero et al., 9 Aug 2025). The model is assessed on regional spatial accuracy, downstream lesion-activity classification, and log-count regression.

The regional metrics on the held-out test set are as follows:

Region Proposed model Monte Carlo baseline
Cerebral WM BA / Precision / Recall / F1 0.684 / 0.537 / 0.629 / 0.579 0.497 / 0.321 / 0.322 / 0.320
Cerebral CX BA / Precision / Recall / F1 0.697 / 0.367 / 0.562 / 0.444 0.503 / 0.154 / 0.135 / 0.143

For binary lesion-activity classification at week 96, the reported AP/AUC by treatment arm are: Placebo XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}04 versus XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}05; NE XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}06 versus XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}07; LE XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}08 versus XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}09; MiE XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}10 versus XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}11; MoE XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}12 versus XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}13; and HE XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}14 versus XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}15 (Favero et al., 9 Aug 2025). For log-count regression, the reported MSE values are Placebo XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}16 versus XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}17, NE XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}18 versus XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}19, LE XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}20 versus XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}21, MiE XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}22 versus XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}23, MoE XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}24 versus XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}25, and HE XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}26 versus XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}27 (Favero et al., 9 Aug 2025). Qualitative figures are said to show variability in lesion placement around periventricular white matter and systematic lesion reduction under higher-efficacy treatments (Favero et al., 9 Aug 2025).

These results illustrate two application regimes. CaPaint addresses generic spatio-temporal prediction and augmentation in settings such as meteorology, human actions, reaction-diffusion PDEs, taxi flow, and wildfire spread (Duan et al., 2024). The multiple sclerosis model addresses personalized medical forecasting and counterfactual therapy analysis (Favero et al., 9 Aug 2025).

7. Interpretive significance, limitations, and common points of confusion

A common source of confusion is the meaning of “treatment-aware.” In CaPaint, the “treatment” is not a clinical intervention but the subset of causal patches XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}28 that genuinely drive future outcomes, while the environmental subset XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}29 is treated as a source of spurious correlation to be regenerated by inpainting (Duan et al., 2024). In the multiple sclerosis model, treatment is literal treatment-arm information embedded as a conditioning variable XtRH×W×CinX_t\in\mathbb{R}^{H\times W\times C_{in}}30 (Favero et al., 9 Aug 2025). These are distinct semantics that share a causal orientation.

Another potential confusion concerns whether the causal claims are purely empirical or formally justified. CaPaint explicitly invokes back-door adjustment and states that front-door logic is used to justify avoiding exponential enumeration of environmental configurations (Duan et al., 2024). The multiple sclerosis model emphasizes causal, image-based generative modeling and enables counterfactual future NET2 masks under different efficacies by varying treatment embeddings while keeping MRI conditioning fixed (Favero et al., 9 Aug 2025). This suggests an intervention-aware use of diffusion models, although the paper also notes that more sophisticated counterfactual analyses and causal metrics remain future work (Favero et al., 9 Aug 2025).

The limitations in the multiple sclerosis setting are explicit. MS lesion formation varies widely across individuals and plausible trajectories, so single-outcome metrics such as Dice or MSE can penalize clinically valid but different forecasts; multi-centre MRI differences and NET2 segmentation noise can divert model capacity; and while the Monte Carlo baselines reflect real-world population-level prognosis, more sophisticated counterfactual analyses and causal metrics remain future work (Favero et al., 9 Aug 2025). In CaPaint, the main stated problem setting is data scarcity, data imbalance, and the lack of causal connections in overly customized models, which undermine generalizability and interpretability (Duan et al., 2024).

Taken together, these studies define an emerging research direction in which diffusion models are coupled to intervention-aware structure in spatio-temporal data. One branch uses causal region identification and selective inpainting to regularize generic spatio-temporal forecasting (Duan et al., 2024). Another branch uses explicit treatment embeddings and longitudinal imaging conditioning to generate future disease states and counterfactual outcomes (Favero et al., 9 Aug 2025). A plausible implication is that future treatment-aware spatio-temporal diffusion models may increasingly unify causal adjustment, structured conditioning, uncertainty-aware generation, and downstream decision support within a single framework.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Treatment-Aware Spatio-Temporal Diffusion Model.