## 2 Methods and Materials
### PK Model Fitting
Transformation from the image signal intensity \(S(t)\) to concentration \(C_{tissue}(t)\) is given in the Appendix A. In the following, the time variable \(t\) will be skipped where possible, for the sake of clarity. There are two modes of network operation. In the _recall_ mode, a trained network recognizes the pattern in the observed data and predicts the possible values of the PK model's parameters. Formally, the network realizes the transformation \(\hat{\mathbf{\theta}}\ =\ f(\mathbf{v},h(\mathbf{w},C_{tissue}))\), which approximates the unknown mapping \(\hat{\mathbf{\theta}}\ =\ \mathcal{F}(C_{tissue})\) from the observation space to the parameter space. It is assumed that this mapping exists and is unique. In the _training_ mode, the network is fed by a large and versatile collection of input vectors, and simultaneously it is presented with an expected parameter set \(\mathbf{\theta}\) for each individual input example. The difference between these true parameter values and the output drives the process of network weights adjustment. Specifically, we applied the mean squared error (MSE) metric as the network loss function. Apart from MSE, during the network weights adjustment, the mean absolute percentage error (MAPE) was also calculated for both the training and validation samples. The definitions of the MSE and MAPE metrics are given in Appendix A. The weights assigned to random values are updated after each iteration using the error backpropagation algorithm [26]. The loss function (dependent on inter-layer weights) was optimized using the stochastic gradient descent algorithm [27]. The network was implemented in a Python script using Keras library with the Tensorflow backend [28]. The crucial step in the above-described procedure is in the preparation of the training set. On the one hand it must be sufficiently large and varied for the network to gain the generalization capabilities. On the other hand, the input signal intensity vectors must be accompanied by the true parameter values, which allow the observation of a given \(C_{tissue}\) in response to a specific arterial input function. Moreover, since the available data set size is relatively small, we repeat this procedure using the leave-one-out approach. Having a data set of 20 examinations, we invoked calculations 20 times, each time excluding another subject AIF from the training stage. Hence, a training set in a given repetition was established via the 3-step procedure described below. Step 1. Selecting a subset of 19 realistic arterial input functions. Step 2. Establishing ranges of model parameter values. Table 1 presents the assumed parameter limits along with their corresponding probability distributions. These limits were fixed with respect to the published values for normal subjects [7,10,29]. Training input samples were generated using the model equation and parameters sampled from these distributions. According to the Tofts model [10], there are four such parameters: \(K^{trans}\), \(v_{p}\), \(T_{g}\) and \(\Delta\). The latter two are the parameters of the vascular impulse response function, whose sum defines the so-called mean residence time (MRT). Since [7,10] report only the value of MRT, we sampled \(T_{g}\) and MRT, whereas \(\Delta\) was calculated as  
\[\Delta=\text{MRT}-T_{g} \tag{5}\]  
Figure 3: Overview of a pharmacokinetic (PK) model parameter fitting using an artificial neural network operating in the training (**a**) and recall (**b**) modes. The three-layer perceptron structure is shown only conceptually—the number of hidden units was adjusted during the network design process. The number of output units was always set to 4, i.e., the number of PK model parameters. All layers are fully connected, as in the conventional multi-layer perceptron (MLP) structures, except dropout mechanism was switched on, in which case random connections between hidden layers were removed during training to prevent network overfitting. Step 3.