
\section{Lesion segmentation}
\label{appendix0}
In Table \ref{tab:restransfer} we can see the results for the lesion. nnUnet is used as a reference model, using exactly the training and validation procedure available in the library (just including our splits). It outperforms  \ac{llstm} using just the proximal dataset (CHSF). So nnUnet is trained on both datasets, arriving at a Dice of 0.72 on average and close to a 100$\%$ percent detection rate. Notice that there is a considerable difference between the performances on the proximal (P)  and distal (D) datasets.  That model is used for the post-processing module in AttLLSTM.

  \begin{table}[ht!]
 % The first argument is the label.
 % The caption goes in the second argument, and the table contents
 % go in the third argument.
  \centering
  {\caption{\label{tab:restransfer}Test set results using \ac{llstm} and nnUnet for lesion detection on both datasets.}}%  
\begin{tabular}{ccc@{\hspace{-0.1ex}}c@{\hspace{-0.1ex}}cc@{\hspace{-0.1ex}}c@{\hspace{-0.1ex}}cc@{\hspace{-0.1ex}}c@{\hspace{-0.1ex}}cc@{\hspace{-0.1ex}}c@{\hspace{-0.1ex}}cc@{\hspace{-0.1ex}}c@{\hspace{-0.1ex}}cc@{\hspace{-0.1ex}}c@{\hspace{-0.1ex}}c}
\toprule

Model &   Datasets &\multicolumn{6}{c}{False Positives}& \multicolumn{6}{c}{False Negatives} &\multicolumn{3}{c}{Dice}&\multicolumn{3}{c}{Det. } \\ \hspace{0.1in}
&& \multicolumn{3}{c}{Count} & \multicolumn{3}{c}{Size}  & \multicolumn{3}{c}{Count} &  \multicolumn{3}{c}{Size} & & \\
&& P&$\mid$&  D& P  & $\mid$ &   D & P  &$\mid$& D  &P  &$\mid$ &  D  & P &$\mid$& D  & P &$\mid$& D 
\\
\midrule
\ac{llstm}  & CHSF  &  0.8&$\mid$& & 82.8 &$\mid$& &1.4&$\mid$&  & 47.5 &$\mid$& & 0.70&$\mid$&  & 1.00&$\mid$&  \\ 
nnUnet & CHSF  &  3.7&$\mid$&  & 33.2&$\mid$&  & 1.9&$\mid$&  & 5.64 &$\mid$& & 0.75&$\mid$&  & 1.00&$\mid$&  \\


\textbf{nnUnet}  & Both  &  \textbf{1.1} &$\mid$&   \textbf{0.2}  & \textbf{19.3}  &$\mid$& \textbf{9.7} & \textbf{1.3} &$\mid$& \textbf{2.4} & \textbf{23.9} &$\mid$& \textbf{14.6}& \textbf{0.77}  &$\mid$& \textbf{0.67} & \textbf{1.00} &$\mid$&   \textbf{0.95} \\

\bottomrule
\end{tabular}

\end{table}

%\section{Improvement due to the post-processing techniques}
%\label{appendix1}
%The two post-processing techniques were defined to reduce the false positives and increase the Dice coefficient. In Table \ref{tab:th2}  we show nnUnet and AttCLSTM results by adding each of the modules.

%\begin{table}[!ht]
%\vspace*{-0.2in}
% \centering
%{\caption{Results using different architectures and configurations for segmenting the thrombi and adding the post-processing modules. The best configuration per model is highlighted in bold. \label{tab:th2}}}
%\vspace*{-0.1in}
 %{ \scalebox{0.75}{\begin{tabular}{ccccc@{\hspace{-0.1ex}}c@{\hspace{-0.1ex}}cc@{\hspace{-0.1ex}}c@{\hspace{-0.1ex}}cc@{\hspace{-0.1ex}}c@{\hspace{-0.1ex}}cc@{\hspace{-0.1ex}}c@{\hspace{-0.1ex}}cc@{\hspace{-0.1ex}}c@{\hspace{-0.1ex}}cc@{\hspace{-0.1ex}}c@{\hspace{-0.1ex}}c}
%\toprule
%Model &   Datasets & Lesion & Thr &\multicolumn{6}{c}{False Positives}& \multicolumn{6}{c}{False Negatives} &\multicolumn{3}{c}{Dice}&\multicolumn{3}{c}{Det. } \\ \hspace{0.1in}
%&&&& \multicolumn{3}{c}{Count} & \multicolumn{3}{c}{Size}  & \multicolumn{3}{c}{Count} &  \multicolumn{3}{c}{Size} & & \\
%&&&& P&$\mid$&  D& P  & $\mid$ &   D & P  &$\mid$& D  &P  &$\mid$ &  D  & P &$\mid$& D  & P &$\mid$& D 
%\\
%\midrule




%nnUnet  &MATAR+CHSF&   & &0.6& $\mid$& 1.1&37.1&$\mid$&222.4& 0.4 &$\mid$& 0.5&373.6&$\mid$&125.3& 0.46& $\mid$ &0.45&0.7 &$\mid$& 0.7\\ 

%nnUnet  &MATAR+CHSF&\checkmark   & &0.0& $\mid$& 0.7&0.0&$\mid$&161.3& 0.4 &$\mid$& 0.5&373.6&$\mid$&130.9& 0.48& $\mid$ &0.51&0.7 &$\mid$& 0.7\\ 
%\textbf{nnUnet}  &MATAR+CHSF&\checkmark   & \checkmark  &\textbf{0.0}& $\mid$& \textbf{0.8}&\textbf{0.0}&$\mid$&\textbf{177.9}& \textbf{0.5} &$\mid$& \textbf{0.5}&\textbf{373.6}&$\mid$&\textbf{130.9}& \textbf{0.49}& $\mid$ &\textbf{0.51}&\textbf{0.7} &$\mid$& \textbf{0.7}\\ 


%AttCLSTM &MATAR+CHSF & & &1.2& $\mid$&1.6 &43.81&$\mid$&99.3& 0.3& $\mid$ &0.4&141.1&$\mid$& 100.7& 0.41 &$\mid$ &0.38 &0.9&$\mid$ &0.72 \\ 
%AttCLSTM  &MATAR+CHSF&\checkmark   & &0.5& $\mid$& 0.9&19.4&$\mid$&109.8& 0.3& $\mid$ &0.6&141.1&$\mid$&134.4 & 0.43 &$\mid$ &0.36&0.9&$\mid$ &0.6 \\
%\textbf{AttCLSTM } &MATAR+CHSF&\checkmark   & \checkmark  &\textbf{0.5}& $\mid$& \textbf{0.9}&\textbf{59.9}&$\mid$&\textbf{245.8} & \textbf{0.3}& $\mid$ &\textbf{0.6}&\textbf{141.1}&$\mid$&\textbf{134.4} & \textbf{0.54}&$\mid$ &\textbf{0.32}&\textbf{0.9}&$\mid$ &\textbf{0.6} \\

%Att\acs{llstm} &MATAR+CHSF & & &1.0& $\mid$& 0.6&49.8&$\mid$&63.3& 0.2&$\mid$&0.3&0.2&$\mid$ &79.4& 0.55 &$\mid$ &0.54 &1.0& $\mid$&0.91\\

%Att\acs{llstm} &MATAR+CHSF &\checkmark   & & 0.0 &$\mid$ &0.1&0.0&$\mid$&8.5& 0.2 &$\mid$& 0.3&0.2&$\mid$&79.4& 0.52& $\mid$& 0.58 &1.0&  $\mid$ & 0.91 \\ 

%\textbf{Att\acs{llstm}}   &MATAR+CHSF &\checkmark   &\checkmark &\textbf{0.0}& $\mid$ &\textbf{0.1}&\textbf{0.0}&$\mid$&\textbf{8.5}& \textbf{0.2}& $\mid$ &\textbf{0.3}&\textbf{0.2}&$\mid$&\textbf{79.4}& \textbf{0.63}& $\mid$ &\textbf{0.59}&\textbf{1.0}& $\mid$ &\textbf{0.91} \\  

%\bottomrule
%\end{tabular}}}
%\end{table}

%In all cases, both post-processing techniques produce an increase in the average Dice score (between proximal (P) and distal (D)). Adding the lesion reduces the number of positives in more than half of them for nnUnet, AttCLSTM and AttLLSTM but for AttCLSTM it also reduces the detection rate for distal cases (some wrong close objects are chosen) and the threshold technique allows to have on average a Dice of 0.43 or higher in all cases. But still, AttLLSTM gets the best results having almost zero false positives and a Dice higher than 0.6.  Indeed, the model is already better without the post-processing comparing it with nnUnet +lesion+thr and AttCLSTM +lesion+thr in all metrics. 

\section{AttLLSTM robustness using control MRIs}
\label{appendix2}
The annotations for the control MRIs are available for MATAR dataset. This MRI is taken just after the treatment is given, to evaluate the effect of it. In some cases, the thrombus completely disappears, and in other cases, it can remain almost in the same position so another treatment is used. To formalize the different cases we can define the distance between the initial thrombus (thrombus$_{1}$) and the one after the treatment (thrombus$_{2}$):

\begin{equation}
    D = \text{dist}(\text{thrombus}_{1},\text{thrombus}_{2})
\end{equation}

Depending on its value, we have a different treatment outcome:
\begin{itemize}
\item If $D = 0$: No treatment effect
\item If $D  = \infty$: The treatment makes the thrombus to disappear.
\end{itemize}

We evaluate our model in the most similar cases to the first MRI (where the distance is smaller) and the cases where the treatment effect is higher (the distance is bigger). We use the distance quartiles $q_{25}$ and $q_{75}$ to obtain these patients, only for the patients where the distance can be calculated (the thrombus is present in both MRIs). In Table \ref{tab:th3}  we can see the results. 
\begin{table}[ht!]
\centering
\caption{Results using DWI, SWAN, and PHASE to detect thrombus using AttLLSTM. For the control MRIs a total of 80 patients are used (the thrombus is still present) and 30 patients satisfy the distance conditions. All the results are obtained with no post-processing.  \label{tab:th3} }
\scalebox{0.9}{\begin{tabular}{llccccccc}
\toprule

Model &      Evaluation (MATAR dataset) & \multicolumn{2}{c}{False Positives}   & \multicolumn{2}{c}{False Negatives} &Dice&Det.  \\ \hspace{0.1in}
&&Count &Size  &Count & Size &     & \\
\midrule


AttLLSTM  & 1st MRI & 0.6&63.3&  0.3&79.4& 0.55& 0.91 \\
AttLLSTM   &  Control MRI ($D<q_{25}$)&0.6 & 19.3& 0.4& 78.8&  0.51 &0.81 \\
AttLLSTM  & Control MRI ($D>q_{75}$)&1.1 &65.1& 1.0& 175.1&  0.10 & 0.25 \\
\bottomrule 


\end{tabular}}

\end{table}

Our model maintains a comparable performance when the treatment has less effect (smaller distance), detecting more than 80$\%$ of the patients but it just detects the 25$\%$ when the treatment produced a bigger effect (having a Dice of 0.51 and 0.1 respectively). The thrombus movement changes the relationship between the modalities; for instance,   the relationship between the lesion and the thrombus is not the same anymore: the treatment can dissolve the thrombus but the lesion remains the same, as it is the damaged tissue. Because of that, the post-processing techniques are not included in this evaluation. We can conclude that our model maintains a similar performance segmenting the thrombus when the treatment effect is low.

