# Multi-Objective Evolutionary Neural Architecture Search with Weight-Sharing Supernet
## 4 Multi-Objective Evolutionary Neural Architecture Search Algorithms
### Bi-Population MOEA/D-Based Neural Architecture Search Algorithm
1:Initialization Phase:
2: Initialize two architecture populations \(A_{1}\) and \(A_{2}\) with size \(N_{\text{pop}}/2\);
3: Generate the global uniform weight vectors \(W\) with size \(N_{\text{pop}}/2\);
4: Select \(T\) closest neighbour weight vectors as \(B(i)\) for each \(w_{i}\in W\);
5: Initialize the global reference points \(Z_{1}\) and \(Z_{2}\);
6: Warm-up Phase: Train and update the supernet for \(E_{\text{warmup}}\) epochs with randomly generated individuals;
7: Set \(I\gets 1\);
8: Iteration Phase:
9:while\(I\leq N_{\text{period}}\)do
10: Weights optimization: Update the supernet for \(E_{\omega}\) epochs with individuals in \(A_{1}\cup A_{2}\);
11: Alphas optimization:
12: Evaluate the fitness values for \(A_{1}\) as \(FV_{1}\) (_error_rate_ and _model_size_), \(A_{2}\) as \(FV_{2}\) (_error_rate_ and \(1-model\_size\));
13: Update \(Z_{1}\) with \(FV_{1}\) and update \(Z_{2}\) with \(FV_{2}\);
14:for each \(a_{i}\in A_{1}\)do
15: Generate an offspring with two randomly sampled neighbours of \(\alpha_{i}\) by applying crossover and mutation (with probabilities \(pc\) and \(pm\));
16: Evaluate the fitness value for the offspring \(Y\) as \(FV_{Y}\);
17: Update the reference points \(Z_{1}\) with \(FV_{Y}\) (_error_rate_ and \(model\_size\));
18: Update the neighbours of \(\alpha_{i}\) with aggregation function \(g^{te}\);
19:endfor
20:for each \(\alpha_{j}\in A_{2}\)do
21: Generate an offspring with two randomly sampled neighbours of \(\alpha_{j}\) by applying crossover and mutation (with probabilities \(pc\) and \(pm\));
22: Evaluate the fitness value for the offspring \(Y\) as \(FV_{Y}\);
23: Update the reference points \(Z_{2}\) with \(FV_{Y}\) (_error_rate_ and \(1-model\_size\));
24: Update the neighbours of \(\alpha_{j}\) with aggregation function \(g^{te}\);
25:endfor
26: Communication phase:
27: Exchange \(N_{\text{comm}}\) individuals between \(A_{1}\) and \(A_{2}\);
28: Update \(Z_{1}\) and \(Z_{2}\) in terms of the global minimum error rate;
29:\(I\gets I+1\);
30:endwhile
31:return\(A_{1},A_{2}\)
```  
**Algorithm 1** Bi-population MOEA/D-based NAS algorithm  
To further illustrate the motivation of the proposed bi-population MOEA/D algorithm, Figure 4 gives an example of a randomly generated population and its corresponding Pareto fronts based on different sorting metrics. Note that the values of objective functions \(f_{1}\) and \(f_{2}\) are set to approximate the model error rate and the model size in the DARTS search space. The left sub-figure illustrates the initial population, where different colors represent different Pareto ranks. It can be noticed that, when applying NSGA-II, individuals marked in red will be prioritized for preservation, which is mainly affiliated with low error rates and small model sizes. On the other hand, individuals with larger model sizes but slightly lower error rates (shown in the dashed box) may be eliminated by the algorithm due to their lower ranking. Similar to in MOEA/D, the individuals will gradually evolve towards the intersection points between the weight vectors and the optimal Pareto front, which may also lead to a preference for smaller models in the early stages of evolution. Thus, it can be inferred that, in large search spaces, the main reason for the small model trap is that partsof networks with significantly different model sizes only show a slight difference in terms of accuracy. On the contrary, the right sub-figure illustrates the population distribution after reversing \(f_{2}\). It can be observed that the larger models from the original population now rank higher on the new Pareto front. In MOEA/D, individuals are guided by a new reference point for optimization. Therefore, by setting up two sub-populations with different optimization objectives and merging the results, the algorithm is able to consider network architectures with different sizes and overcome the issue of the small model trap.