# Topology Optimisation under Uncertainties with Neural Networks
## 3 Neural Network Architectures
### Topology Convolutional Neural Networks (TCNN)
#### 3.1.2 Data Preparation
It is easy to see how the metrics diverge with the first application of the CNN at iteration step 55, especially by the computation time required per iteration. The most significant indicator is the evaluation of \(J^{\varepsilon}(\varphi_{n})\) per iteration of Equation (3) at the top-right of Figure 5. The graph for Algorithm 1 reaches a constant lower level than that of Algorithm A1 after about 250 iterations and thus fulfils the convergence criterion earlier. Accordingly, the step size criterion for \(\tau_{n}\) applies earlier by using the CNN, which further accelerates convergence. An interesting insight is provided by the calculation time, which shows that the actual time required per iteration step is more or less the same, except for the iteration steps in which Equation (22) is applied. This is indicated by the upward outliers in the computation time series. This additional computation cost can be explained by the application of the mesh projection of Equation (21), which represents an aspect requiring further improvements. Nevertheless, in total we achieve a shorter total run-time due to the faster convergence of Algorithm 1. A detailed list of the run-times and target value metrics for the functional \(J^{\varepsilon}(\varphi_{n})\) is provided in Table 1. The evaluation of \(J^{\varepsilon}(\varphi_{n_{\text{final}}})\) denotes the value of the functional for the topology \(\varphi_{n_{\text{final}}}\) converged after \(n_{\text{final}}\in\mathbb{N}\) iteration steps. The compliance is the value that is actually minimised in terms of the functional \(J^{\varepsilon}(\varphi_{n_{\text{final}}})\). Algorithm 1 requires less computing time than the reference procedure after extending it with the CNN architecture from Equation (22). #### 4.1.4 Stochastic Bridge Optimisation

Algorithm A2 can easily be extended by the TCNN of Equation (22) in order to improve the efficiency for topology optimisation under uncertainties. The corresponding procedure is shown in Algorithm 2 where we chose \(c_{m}=55\) for all \(m\in\mathbb{N}\). Note that the predictions of the different realisations of \(\varphi_{n}(\omega_{i}),\omega_{i}\in\Omega\) for \(i=1,\ldots,S\in\mathbb{N}\) (where an evaluation \(\varphi_{n}(\omega_{i})\) are to be interpreted as transformation of an evaluation from \(g(\omega_{i})\)) are actually not executed within a loop but in parallel (lines 8-12 of Algorithm 2). This is possible because NNs are generally able to process batches of data in parallel. We have also implemented parallelisation for Algorithm A2, which is limited by the number of processor cores of the actual compute cluster. We want to compare the performance of Algorithms A2 and 2 using the same setting as in Appendix A.2. To ensure comparable results despite stochastic parameters, we set the random seed to 42 before running both algorithms. The resulting sub-sequences of \(\varphi_{n}\) are compared side by side in Figure 6. Although the topology converges after fewer iterations with Algorithm A2, one can see that the topology resulting from Algorithm 2 has a more stable shape since the topology does not lose material to the unnecessary extra spoke. This is confirmed by the metrics in Table 2 where one can see that Algorithm 2 achieved a lower compliance after fewer iteration steps. Additionally, the optimisation of Algorithm 2 is stopped after 500 iterations to show that it achieves a better result in less time as shown in Figure 7. A notable observation is that the times of applying Equation (22) in Algorithm 2 can be identified by the spikes in the computation time of the iterations. It can be seen that despite the additional time required by the transformation in Equation (21), the calculation of a stochastic gradient step using Equation (22) is generally faster. This is due to the dynamic parallelisation that PyTorch provides when processing batches (in our case the approximation of multiple evaluations from \(\varphi_{n}(\omega_{i})\) with NNs).