# Automatic Initialization Methods for Photonic Components on a Silicon-Based Optical Switch
## 4 Algorithm Training and Benchmark  
In practice, the target function we needed for optimization was the optical signal at the output of the switching nodes and the interleavers (as sketched in Figure 2). As an example, Figure 4 shows the steps performed in a local NM search, to align one switching node. The contour plot in the background has been obtained by collecting the signal (T) dropped by the switching node at each point of the search domain (i.e., for all of the bias combinations applicable to the MRR heaters). Above the contour, a series of simplexes (triangles) is superimposed, which represent the evolution of the NM optimization. The starting triangle is shown in red, while alternating black and white triangles follow from the different actions toward convergence, namely reflection, expansion, contraction, and shrinkage. Figure 3: Flow chart of the Globalized Bounded Nelder–Mead method. In the green square, on the top right, a single Nelder–Mead search is represented. We could infer the influence that the heaters in the single switching node had on each other, by noting that the contour plot was not symmetric with respect to the line connecting the domain points [4,0] and [0,4]. In fact, the upper and the rightmost tails of the surface were stretched toward the plot axes. In any case, this effect did not prevent the global maximum to be clearly distinguished by the optimization algorithm. During our tests, we also confirmed that the discretization of the search domain due to the 7-bit PWM heater control was dense enough to allow the precise tracking of the local optima, without the need to tighten the convergence/degeneration criteria. It was clear that the target function had a single local maximum and that the NM search converged to it in a few steps. In our implementation, the starting point could be selected by the user so that we could push the first NM search in the nearby region where the maximum was expected to be. Earlier, to launch a new NM search, the GBNM algorithm pulled \(N_{r}\) points within the search domain and chose the one with the highest probability of having not been evaluated before as the next starting point. The GBNM exited when it reached a preset number of cycles, \(N_{max}\). Figure 5 compares the performance of the GBNM method for several combinations of \(N_{r}\) and \(N_{max}\), when we tried to optimize a double MRR-based node. The blue circles represent the starting points of the subsequent NM searches, while the red circles represent the convergence points (local optima). Figure 4: Contour plot of the optical signal routed toward the drop port of one switching node, due to the change of the bias voltages applied to the MRR heaters. On top of the plot, the iterations of a Nelder–Mead search are sketched. The red triangle represent the starting condition, while the alternating black and white triangles describe how the NM search evolve. By comparing the upper two plots of Figure 5 we can appreciate how \(N_{r}\) affected the restarts when \(N_{max}\) was kept constant. If \(N_{r}\) was 1, the re-initialization was completely random because no selection of the best point could be operated when the pool contained a single point (Figure 5 (top left)). If \(N_{r}\) was large (i.e., 500), the starting points come to lie on a lattice (Figure 5 (bottom left)), as this was the geometric layout that minimized the probability density \(\Phi(\mathbf{x})\). So, \(N_{r}\) should be chosen in such a way to reach a compromise between a random and a grid arrangement. However, it was not crucial to find the best value of \(N_{r}\) for our target function, according to the outcomes showed in Figure 5 (middle panels). In fact, these two conditions were pretty similar and we could ensure a sufficiently broad search within the domain, as well as a limited computational cost of the GBNM algorithm, if we chose \(N_{r}\in\) [5;10]. Focusing on \(N_{max}\), it was interesting to see what happened when it was increased to 10,000 (Figure 5 (right panels)).