\begin{figure}[h!]
    \centering
    \includegraphics[width=\linewidth,height=7.5cm]{figures/results/vessels_smaller.png}
    \caption{Synthetic vessel trees. The bottom two rows display the skeletons with the closest match from the training set.}
    \label{fig:vessels}
\end{figure}

\begin{figure}[ht!]
    \centering
    \includegraphics[width=\textwidth]{figures/results/histograms.png}
    \caption{Distributions of tortuosity, average radius (in mm), and ICA-M1 bifurcation angle (in degrees) for the different vessel segments with and without an M1 occlusion.}
    \label{fig:histograms}
\end{figure}

\section{Results and Evaluation}

We train the diffusion model to generate cerebral vessel tree centerlines of 256 points, conditioned on an M1 occlusion. The training and sampling details are given in Section \ref{sec:eval_meth}. In Section \ref{sec:qual}, we assess the geometric characteristics of the synthesized vessels, as well as model diversity. We quantitatively analyze the distributions of the geometric characteristics in Section \ref{sec:quant}.

\subsection{Evaluation Methodology} \label{sec:eval_meth}

We use the default hyperparameters from EDM \cite{karras2022elucidating} for the diffusion process, as tuning these did yield better results. The transformer architecture consists of 6 cross-attention blocks with 8 attention heads and a hidden dimension of 64 trained on centerlines. The model is trained for 2500 epochs with a batch size of 16 using the AdamW \cite{loshchilov2017decoupled} optimizer. We use a cosine annealing learning rate schedule, with an initial learning rate of $1\text{e}^{-7}$ that increases to $1\text{e}^{-4}$ in the first 100 epochs, after which it decreases back to $1\text{e}^{-7}$. We found these hyperparameters to result in accurate generative results while preventing the model from overfitting, which we validated on the held-out test set.

For evaluating the generative model, we sample a synthetic population of 200 samples, 100 of which contain an M1 occlusion. All synthetic samples are processed by the sequencing algorithm. Of the 200 samples, the sequencing algorithm failed on 7 M2 segments due to too much noise. We attribute this due to the large variance in M2 geometry combined with the small training set. For the sequencing algorithm, we set $\alpha = 0.25$ and $k = 5$. With these parameters, the algorithm successfully processes the train and test sets.


\subsection{Qualitative Results and Diversity} \label{sec:qual}


% \begin{figure}
%     \centering
%     \includegraphics[width=0.95\linewidth]{figures/results/vessels_match.png}
%     \caption{Comparison of synthesized centerlines with (top) and without (bottom) an M1 occlusion to the closest match in the dataset.}
%     \label{fig:diversity}
% \end{figure}

The quality of the synthetic vessels is assessed by comparing the distributions of tortuosity, average radius of the ICA, ACA, M1, and M2 and ICA-M1 bifurcation angle between the synthetic data and the real training population in Figure \ref{fig:histograms}. We observe that the distributions are specific to each vessel type and the presence of an M1-occlusion. Furthermore, the synthesized vessels represent the distributions of the geometric characteristics of the training set. This suggests that the model successfully captures the geometry of the vessel trees. Noteworthy, the model does not assign the wrong vessel type to the centerline points, e.g., assigning type  ICA to a point belonging to the M1.  We also assess the diversity of the synthesized population compared to the training set. We analyze the diversity by finding the closest sample from the training set for each sample in the synthetic population using the Chamfer distance. We observe that the model generates both diverse samples and samples that more closely resemble the training set, see Appendix \ref{sec:appendix_cd}. Examples of generated vessels are shown in Figure \ref{fig:vessels}.


% The quality of the synthetic vessels is assessed by comparing the distributions of tortuosity, average radius, and ICA-M1 bifurcation angle of the ICA, ACA, M1, and M2 to the real training population in Figure \ref{fig:histograms}. The distributions show a strong similarity between the real and synthesized vessels for samples with and without an M1 occlusion. The distributions can differ between vessel types and the presence of M1 occlusion, which suggests the model is successful in capturing the geometry of the vessel trees. 

\begin{figure}[ht!]
    \centering
    \includegraphics[width=\textwidth]{figures/results/heatmaps.png}
    \caption{Differences between geometric characteristic distributions for samples with (a) and without (b) an M1-occlusion. *p-value $< 0.05$. **p-value $< 0.01$.}
    \label{fig:heatmaps}
\end{figure}

\subsection{Quantitative Analysis of Geometric Characteristics} \label{sec:quant}

We further analyze the distributions from Figure \ref{fig:histograms} by measuring their difference using the Kolmogorov-Smirnov (KS) test. When we compare the top and bottom rows of Figure \ref{fig:heatmaps}, we observe that the differences between distributions between the synthetic vessels and the training set are similar to the differences within the training set itself. We also observe that the distributions of the vessels in the training set are specific to each vessel type and the presence of an M1-occlusion. The same specific distributions are seen in the synthetic population, which aligns with our observations in Section \ref{sec:qual}. This indicates that the distributions generated by the model are not arbitrary, but rather that the model successfully captures the specific geometries and conditioning from the training set.

% We measure the differences between the distributions of tortuosity and average radius of the different vessel types from Figure \ref{fig:histograms} using the Kolmogorov-Smirnov (KS) test, which can be seen Figure \ref{fig:heatmaps}. Not only does this show us how the distributions between the synthetic and real population differ, but it also provides an overview of how the different vessel types differ from each other in the real population. We observe significant differences in distributions between the vessel segments and the presence of an M1 occlusion. Furthermore, the differences measured between the synthetic and the real population distributions closely resemble those seen in the real population. This is in line with the distributions we observed in Figure \ref{fig:histograms} and further suggests the model successfully captured the geometry and conditioning of the vessel trees.