# Topology Optimisation under Uncertainties with Neural Networks
## 3 Neural Network Architectures
### Topology Convolutional Neural Networks (TCNN)
#### 3.1.2 Data Preparation
In considering the stochastic setting of the problem as defined in Section 2.2, the TCNN is trained to learn the gradient steps \(\varphi\) for a random \(g:\Omega\rightarrow\mathbb{R}^{d}\). #### 4.1.1 Sampling the Data

To train the architecture, appropriate training data have to be generated. In order to achieve this, we chose the same setting for \(g\) as in SectionA.2. Using the optimiser in AlgorithmA1, we can generate \(S\in\mathbb{N}\) different sample paths of gradient steps \(\varphi_{n}(g)\) and solutions of the state equation \(u_{n}(g)\) by generating \(S\) samples of \(g\). In this procedure, we store every \(k\in\mathbb{N}\) iteration step of \(\varphi_{n}\) and \(u_{n}\) in order to approximate \(k\) gradient steps at once. More precisely, we store \(\lfloor\frac{N_{\text{max}}}{k}\rfloor-1\) tuples

\[\left(\left[\varphi_{n}\quad u_{n+1}^{x}\quad u_{n+1}^{y}\right],\left[\varphi _{n+k}\right]\right), \tag{33}\]

with \(0\leq n\leq N_{\text{max}}-k\), where \(N_{\text{max}}\in\mathbb{N}\) is fixed in advance, representing the maximum number of iterations of an optimisation. For the training of the models in the following experiments, we have chosen \(N_{\text{max}}=500\) since the topologies have mostly converged after this number of iterations. The overall number of \(S(\lfloor\frac{N_{\text{max}}}{k}\rfloor-1)\) tuples are merged into an unsorted data set \(\mathcal{D}_{\text{CNN}}\). #### 4.1.2 TCNN Predictions

The following experiment validates that the performance of AlgorithmA1 can be replicated or (desirably) improved by including a CNN as described in Algorithm1. As a first test, we illustrate that the proposed new architecture is indeed capable of predicting the gradients of the optimisation procedure. Figure4 shows the evaluations of the model Equation22 after determining \(\theta\) within the training of the NN on the data set \(\mathcal{D}_{\text{CNN}}\). Here, the prediction \(\mathcal{N}_{\text{CNN}}^{k}(\varphi_{n},u_{n+1};\theta)\) and the actual gradient step \(\varphi_{n+k}\) generated by AlgorithmA1 are compared for different loads sampled from a truncated normally distributed \(g\). Since the predictions of \(\mathcal{N}_{\text{CNN}}^{5}\) are hardly distinguishable from the reference fields, we have also trained Equation22 to predict larger time steps (for 25 and 100 iteration steps at once). However, these NNs have proved to be less reliable in practice as prediction quality decreases. An illustrative selection of some predictions is provided in FiguresA5 andA6 in AppendixC. #### 4.1.3 Deterministic Bridge Optimisation

In these experiments we compare the performance of Algorithm1 with that of AlgorithmA1 in the setting of SectionA.1. For the NN in Algorithm1, we use Equation22 from Example2. For \(c_{m}\in\mathbb{N}\) in Algorithm1 we chose \(c_{m}=55\) for all \(m\in\mathbb{N}\). In order to train Equation22, data of the form of Equation33 from Section4.1.1 are used. We expect that the best (reference) results in the setting from experimentA1 can be obtained, since the distribution of the training data is a truncated normal distribution around this expected value and we thereby have an accumulation of training points around the load \(g=(0,-5000)^{T}\). As a convergence criterion, we used the convergence criterion of the mesh refinement of EquationA1 on a maximally fine mesh with \(|V(\mathcal{T}_{m})|\leq 15,000\). A sub-sequence generated by Algorithm1 is shown in FigureA7 in comparison to that of SectionA.1 in FigureA7b in AppendixC. There, it can be observed that the classical and CNN-assisted optimisation results essentially appear identical with the faster CNN convergence. The metrics for evaluating our algorithms have also improved through the application of the CNN as can be observed in Figure 5. For better comparability, we ran both algorithms 10 times and averaged all metrics. To be more precise, this is only the average of the calculation time, as the remaining metrics are deterministic and therefore always the same.