3 Numerical results
In this section, we compare the performance of APTS against well-established training algorithms such as SGD, LBFGS, and Adam. All tests, accessible through the repository in [12], were conducted using Python 3.9, with the implementation leveraging PyTorch version 2.0.1+cu117. For SGD, LBFGS, and Adam, we utilized the standard optimizers provided by PyTorch.
We tuned the hyperparameters of SGD, LBFGS, and Adam to ensure a fair comparison, recording the average best results in 10 trials across various parameter configurations. Specifically:
-
For SGD, we evaluated 63 combinations, varying the learning rate in and the momentum in [0.1,0.9].
-
For LBFGS, we considered 45 combinations, adjusting both the learning rate within the interval and the history size (the amount of stored updates of the Hessian) within [3,50]. Note that we set the line_search_fn parameter to strong_wolfe.
-
For Adam, we examined 13 different learning rates within the interval .
For these three algorithms, all other input parameters were kept as their standard PyTorch default values. Moreover, the selected optimal parameters are shown in the legend of the figures. In contrast, APTS and TR were consistently run with the same set of input parameters across all tests. Detailed descriptions of these settings can be found in the next section.
Afterwards, we provide a detailed analysis of the obtained results, highlighting the characteristics of APTS in comparison to SGD, LBFGS, Adam, and TR. Note that in the absence of the mini-batch strategy, the SGD optimizer simplifies to the traditional Gradient Descent (GD) algorithm. We remark that one epoch of APTS consists in the preconditioning step and the global step in lines 5–18 of Algorithm 8.1.
Finally, some of the following plots will depict the average test accuracy and training loss (represented by a solid line) alongside the variance observed in the worst and best runs (indicated by dashed lines) across 10 independent trials, each initialized with different random NN parameters.
3.1 APTS implementation details and parameter configuration
The PyTorch programming environment imposes certain constraints on the level of control one has over parameter training. Parameters are configured in vectors, with entire vectors designated as either trainable or nontrainable. This means that, for instance, a fully connected layer, which consists of weights and biases, is stored as a structure composed by two distinct vectors of learnable parameters, and they can be configured to be trained independently. Therefore, the projectors in Equation (8.4) are built in a way to maximize the efficiency in training, that is, there will not be two weights belonging to the same PyTorch vectors with different trainable/non-trainable settings. Furthermore, the projectors are randomly generated, that is, if we have a total of M vectors of parameters and we want to split them across N models, each model will have approximately round randomly selected trainable vectors.
Key configurations in our implementation of the APTS algorithm are as follows:
-
In step 8 of APTS, that is, Algorithm 8.1, the amount of subdomains (submodels ) is specified in the legend of the figures in Section 3 and the trainable weight vectors are randomly selected.
-
In step 10, concerning the local TR, we configured:
-
A maximum amount of iterations to .
-
A minimum radius of , an initial radius equal to the current global TR radius , and a dynamically adjusted maximum radius at the jth iteration to ensure that the cumulative step remains bounded by the global TR radius.
-
Whenever a quadratic model (8.2) is considered, history size for the SR1 Hessian is set to 5. Moreover, at the start of the preconditioning iteration, the local Hessian history is synchronized with the global one.
-
The reduction and acceptance ratios are the standard values for TR, that is, and .
-
The decrease and increase factors α and β are set to 0.5 and 2, respectively.
-
-
In step 17, which involves the global TR:
-
Minimum, maximum, and initial radii are set to , , and , respectively.
-
The values of α, β, , match the ones of the local TR.
-
The reduction and acceptance ratios match those of the local TR.
-
Whenever a quadratic model (8.2) is considered, history size for the SR1 approximated Hessian is set to 5.
-
Note that both the global and local TR use the infinity norm to compute the length of the steps. This does not conflict with 2-norm used by the OBS method, as the 2-norm is bounded by the infinity-norm.
In the numerical results Section 3, the TR method as stand-alone solver, denoted by TR in the figures, has the same settings as the global TR method in APTS.
3.2 MNIST
We conducted some preliminary experiments using the MNIST data set [37]. This data set comprises 60,000 training images and 10,000 test images of handwritten digits, each of which is a 28×28 pixel grayscale image. For this experiment, we considered a Fully Connected Neural Network (FCNN) trained on the entire data set, that is, without the use of a mini-batch strategy.
The FCNN used in our experiments consists of three fully connected layers (6 PyTorch vectors), resulting in a total of 26,506 parameters. To investigate the performance of APTS, we configured it with 2, 4, and 6 subdomains and with an enabled/disabled forced-decreasing-loss parameter (fdl), while other parameters are reported in Section 3.1.
Observing Figure 8.1a, we note that Adam, LBFGS, and GD achieve comparable levels of accuracy. However, GD exhibits a marginally higher number of epochs to converge and a greater variance in its results. The TR variants, utilizing both first- and second-order information in Equation (8.2) (denoted by and , respectively), demonstrate a slower convergence compared to the benchmark algorithms. TR( ) overtakes its first-order counterpart TR( ) after 70 epochs. This can be attributed to the enhanced reliability of the approximated Hessian close to a minimizer of the training loss, which has a flatter landscape in comparison to the initial training phase. Moreover, the introduction of second-order information tends to stabilize the variation among TR iterations compared to the first-order approach.

Figure 8.1 Comparison of APTS variants and baseline optimizers on FCNN trained on MNIST.
In Figure 8.1b, the APTS variants employing first- and second-order derivatives with fdl turned off are presented. The use of second-order derivatives seems to facilitate a smoother progression of the loss function over the training epochs. Conversely, reliance on first-order derivatives results in more fluctuating loss values. Nonetheless, both variants converge to comparable levels of loss and accuracy, with a limited variance suggesting a consistent convergence pattern across different runs.
Figures 8.1c and 8.1d showcase the APTS variants with fdl enabled. Here, the application of second-order information leads to reduced variance and marginally superior accuracy relative to the first-order variant. Additionally, an increase in the number of subdomains correlates with improved performance. APTS with 6 subdomains not only slightly outperforms the 2 and 4 subdomain configurations in terms of accuracy, but also shows a reduced variance. This enhanced performance likely results from the added subdomains enabling more thorough exploration of the loss landscape through independent parameter adjustments, in contrast to the constrained exploration provided by a lower count of subdomains. This concept aligns with prior studies advocating for distinct weight and bias training strategies to improve training dynamics [1].
A comparison of Figures 8.1a, 8.1b, and 8.1c reveals that APTS with six subdomains, with fdl disabled and first-order information, attains similar performances to Adam, with Adam reaching the maximum accuracy slightly faster, and a marginally superior accuracy and lower loss than its counterpart with fdl enabled. This highlights the importance of unrestricted parameter exploration in improving training efficiency, similar to the exploration afforded by a higher subdomain count.
3.3 CIFAR-10
Following our MNIST investigation, we evaluated the solution strategies using the CIFAR-10 data set [36], containing 50,000 training and 10,000 test 32×32 color images across 10 classes. For these experiments, we employed the ResNet18 architecture from the PyTorch library with 11,689,512 parameters stored in 62 PyTorch vectors. Training was conducted using a mini-batch strategy, with 20 overlapping mini-batches, each containing 2,975 samples, which were created with a overlap between the mini-batches in order to reduce variance.

Figure 8.2 Comparison of APTS variants and baseline optimizers on CNN trained on CIFAR-10.
In Figure 8.2, we present a comparative analysis between stochastic Adam and various configurations of SAPTS. Specifically, Figure 8.2a features SAPTS with 2, 15, and 30 subdomains, a first-order TR approach for the subproblems, and with the feature fdl deactivated. In Figure 8.2b, the number of subdomains is set to 60 while we vary parameters such as fdl and order. We do not provide results for SGD here as Adam achieved a higher test accuracy, and our aim is to provide a comparison with APTS.
Our primary focus was on configurations with and . The rationale behind this is that activating fdl (as shown in Figure 8.2b) leads to a deterioration in the generalization abilities of SAPTS, albeit with a higher reduction in loss compared to other SAPTS variants. Regarding , SAPTS exhibited poor generalization and did not significantly reduce the loss. However, it maintained a smoother loss curve compared to other tested SAPTS variants as in the previous nonstochastic cases.
When analyzing SAPTS with and across different numbers of subdomains, we observe a correlation similar to that in non-stochastic tests: SAPTS’ performance improves with an increased number of subdomains. Additionally, when comparing SAPTS with 60 subdomains against Adam, we find that SAPTS demonstrates marginally better generalization over a longer period and requires only a few more epochs to match the performance level of Adam.