# Modified Neural Architecture Search (NAS) Using the Chromosome Non-Disjunction
## 3 Methodology
### Evolutionary Process  
Figure 2 shows the overall evolutionary process, where six steps are processed. In Phase I, users have to initialize some parameters, such as the termination condition, training data, testing data, learning rate, initial chromosomes, mutation rate, crossover rate, and non-disjunction rate. In Phase II, the system selects individuals to survive and crossbreed. The selector uses a fitness value for selection. Selected individuals make offspring according to the given rules. For example, the top 10% of the population can crossbreed, or the bottom 10% of the population can crossbreed. In Phase III, genetic operations are applied to offspring from selected individuals. Mutation, cross-over, and non-disjunction operations ensure that the offspring are different from their parents. These offspring are generated to the DNN architecture in Phase IV. The DNN architecture generator designs the DNN architecture from the chromosomes of individuals through the node checker and link checker. If the node checker of the link checker concludes that generating the DNN architecture from an individual is impossible, the DNN architecture generator will stop. Generated DNN architectures will be trained in Phase V. In Phase VI, the fitness values of the trained DNN architectures are calculated from test and validation results. After Phase VI, individuals sorted by their fitness values are sent to Phase II.  
Figure 1: System configuration of NAS using a genetic algorithm with chromosome non-disjunction.  
DNN architectures can be presented as chromosomes. Figure 3 shows an example of matching between chromosomes and the DNN architecture. Each layer and link must be presented as one chromosome. In addition, each chromosome has to contain all of the information for a layer or link.  
Algorithm 1 presents the pseudocode of the genetic operation. Indchild takes genes from each parent randomly in order to widen the exploration. It helps this algorithm find unexpected models [25, 26]. In this process, a gene from a parent can be mutated and thereby differ from the parent. Non-disjunction can occur in the same way.  
Figure 2: Overall evolutionary process.  
```
Input:\(Ind_{p1}\), \(Ind_{p2}\) Output:\(Ind_{child}\) if\(Ind_{p1}.chromosomes.num>=Ind_{p2}.chromosomes.num\)then  size := \(Ind_{p1}.chromosomes.num\) else  size := \(Ind_{p2}.chromosomes.num\) endif \(r\) := random(0,1) while True do if\(r\) = 0 then \(feedChrom:=Ind_{p1}.chromosomes[i]\) elseif\(r\) = 1 then \(feedChrom:=Ind_{p2}.chromosomes[i]\) endif if isNonDisjunction = True then  Add another \(chromosome[i]\) to \(Ind_{child}\) endif if isMutation = True then  Mutate \(feedChrom\) endif \(feedChrom\) to \(Ind_{child}\) endwhile return\(Ind_{child}\)
```  
**Algorithm 1** GA generator  
Algorithm 2 presents the pseudocode of the DNN structuring. The most important factor in this process is to check the possibility of developing an architecture and its connectivity. Every input entering into a specific layer is added together because we adopt a FusionNet method for the residual layer [60,61].  
Figure 3: Example of matching between chromosomes and DNN architecture.  
```
Input:\(1 Individual\) Output: DNN Architecture ifcheckLink is True then \(dead:=\) False else \(dead:=\) True endif ifdead = False then for each links as l do ifIndividual_chromosomes[\(l[0]\)].\(type=\)\"layer\" then  Add layer to \(layers\) endif endfor ifcheckModel is True then \(dead:=\) False else \(dead:=\) True endif endif for each links as l do if\(l[1]\) is output then \(sum:=sum+\)FindLink \((x,link)\) endif endfor procedurefindLink(\(x,link\)) for each links as l do if\(l[1]=link[0]\)then \(sum:=sum+\)FindLink \((x,l)\) endif endfor \(x=layers[link[0]](x)\) if\(l[1]\) is not output then if\(layers[link[0]]\) has activation function then \(actFunc[link[1]]\) endif endif endprocedure return\(x\)
```  
**Algorithm 2** DNN generator