## 2 Methods and Materials
### PK Model Fitting  
There are several optimizers utilized in the NLLS curve-fitting problems. Downhill Simplex, Levenberg-Marquardt or non-linear conjugate gradients belong to the most frequently cited algorithms [24]. In the DCE-MRI context, a popular solver is based on the gradient expansion method implemented in the IDL Software [7]. Often, in order to ensure that the resulting parameter set falls into a range of reasonable physiological values, it is also necessary to restrain the optimization procedure to a specific solution subspace. In such a case, the Trust Region Reflective technique can be considered as the algorithm of choice as it enables optimization with constraints. All the above-mentioned methods are iterative, and require initiation with a starting point representing a feasible solution. As such, there is a risk of getting stuck in a local minimum of the objective function, usually defined as the mean squared error of the model residuals. Therefore, we propose to solve the curve-fitting problem using an artificial neural network (ANN); specifically, a fully-connected multi-layer perceptron structure. ANNs have been successfully employed in a variety of optimization scenarios, including the fitting of complex, multi-parametric relationships to the observed noisy data [25]. The neural network training process is configured to explore a wide range of feasible parameter values, potentially covering the whole solution space. For every parameter  
Figure 2: Steps of automatic arterial input function (AIF) determination algorithm. candidate set, there is a corresponding CA concentration time course generated based on the PK model equation. Thus, the network incorporates a priori knowledge about the underlying mechanism of signal generation. Then, the network's response to an observed, patient-specific CA time-course is estimated in the generalized context of tracer kinetics, making the fitting process more robust to noise, measurement errors and local minima. The first step in the design of an MLP network is the choice of the number of hidden layers. As formulated by the already recalled universal approximation theorem, one sufficiently large hidden layer should enable the accurate approximation of the modeled function. In cases of complex problems, however, two layers with lower numbers of units may be easier to train, and could better acquire a general pattern that links input data vectors with estimated function parameters. We have observed such behavior in the current study. One-hidden-layer structures turned out to be more prone to overfitting, and their training process was less liable to converge. Therefore, in the rest of the paper we concentrate on the description of the three-layer architecture, i.e., consisting of two hidden layers and one output layer. However, in the Results section we provide example outcomes of training two-layer structures to support the above observations. On the other hand, increasing the network depth to three hidden layers did not improve training efficacy, while making the task of optimizing the network architecture more complicated. Hence, the results of these computations are omitted in the experiments description. The overall concept of a three-layer perceptron network operating as an estimator of the Tofts model parameters is shown in Figure 3. The network design is represented by weight vectors \(\mathbf{w}=[\mathbf{v}_{1},\mathbf{w}_{2}]\), and \(\mathbf{v}\) for two hidden layers and the output layer neurons respectively. The symbols \(f(\cdot)\) and \(h(\cdot)\) denote the activation functions of perceptrons in a given layer. In our implementation we used the same activation for both hidden layers, which was the rectified linear unit function, i.e., \(h(x)=\max(x,\,0)\). For the output layer we used linear activation. The detailed structure of implemented MLP is presented in the Results section. In principle, the network inputs accept a vector \(C_{tissue}(t)\) of CA concentrations in the subsequent time frames of a given DCE series.