<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <article-id pub-id-type="doi">10.15199/48.2019.04.24</article-id>
      <title-group>
        <article-title>Mutation Control in Neat for Customizable Neural Networks</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Galchenkov Oleg,</string-name>
          <email>o.n.galchenkov@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nevrev Alexander,</string-name>
          <email>a.i.nevrev@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Ph.D., Senior Lecturer, Odesa National Polytechnic, University</institution>
          ,
          <addr-line>Ukraine, Odesa</addr-line>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2019</year>
      </pub-date>
      <issue>4</issue>
      <abstract>
        <p>A modification of the NEAT algorithm is proposed through the use of a mechanism for changing the level of mutations. At the same time, both the weight coefficients and the number of neurons in the hidden layers and the connections between them change. For the task of modelling the XOR operator, a significant acceleration of the training of a neural network was obtained.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Among the algorithms aimed at solving these issues, one of the basic ones is the NEAT (NeuroEvolution of
Augmenting Topologies) genetic algorithm [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. All new modifications represent an improvement on this algorithm.
As a rule, all new ideas can be used for this algorithm at the same time. Therefore, in this work, when developing a
new modification of the NEAT algorithm, it seems appropriate to use it as a base one as well.
      </p>
      <p>The entire configuration of the neural network in the form of a linear representation of neurons and the
connections between them is used as the genome in the NEAT algorithm. The initial conditions for the genome are
set in the form of a minimal configuration of the neural network and its size increases as it learns. To control the
expandability of the network, each element of the genome (neurons and the connections between them) is assigned an
innovative number that allows you to take into account the moment this element appears in the genome and,
accordingly, the number of iterations of the learning algorithm during which this element is part of the given genome.
The presence of an innovative number allows us to differentiate elements of genomes (genes) depending on the history
of their appearance in the genome. Genes are called matching if they have the same innovation numbers. If the numbers
are different, then the genes are called disjoint if the number of one lies in the range of the number of innovations in
the genome of the other gene, or redundant if the number of one is outside this range. When a new genome is formed
from matching genes, one of them is randomly taken from any parent, and redundant and disjoint genes are taken from
the parent with a large value of the quality function (fitness function). Thus, the NEAT algorithm produces a crossover
without using the function of assessing the complexity of the current topology and is aimed at ensuring the
predominance of genes with a positive effect over random genes.</p>
      <p>Since the introduction of new structural elements in the short term usually worsens the importance of the fitness
function, and a positive effect is achieved after appropriate weighting, the NEAT algorithm uses innovative numbers
to form niches for genomes with structural innovations and having similar topologies. Moreover, over a given number
of iterations, genomes compete with each other only within niches, and not with the entire set of genomes. This allows
you to protect new topological elements while adjusting the weight coefficients of these elements. The network
structure gradually increases as structural mutations occur, leading to a better value of the quality function.</p>
      <p>The aim of this work is the further development of the NEAT algorithm to ensure a higher learning speed and
achieve the resulting structure of a neural network with a small number of neurons and the connections between them.</p>
      <p>
        The NEAT algorithm is based on the ideology of the genetic approach [10] and, accordingly, involves the
following steps [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]:
1) Generation of an initial population of individuals;
2) The calculation for each individual of its suitability with the help of a fitness function (quality function);
      </p>
    </sec>
    <sec id="sec-2">
      <title>3) Removal of weak individuals;</title>
    </sec>
    <sec id="sec-3">
      <title>4) Conducting a crossover of the best individuals in order to produce a new population;</title>
      <p>5) Carrying out mutations of descendants due to changes in weighting factors, adding/removing connections between
neurons, adding/removing neurons;</p>
    </sec>
    <sec id="sec-4">
      <title>6) Repeat steps 2-5 until the desired value of the quality function is reached. Elite selection is used to remove weak individuals. He assumes that there remains a fixed percentage of the best individuals, and the rest are discarded.</title>
    </sec>
    <sec id="sec-5">
      <title>The NEAT algorithm assumes three types of mutations. 1.</title>
    </sec>
    <sec id="sec-6">
      <title>Mutations of weights (Fig. 1)</title>
    </sec>
    <sec id="sec-7">
      <title>Removing/adding connections between neurons (Fig. 2).</title>
    </sec>
    <sec id="sec-8">
      <title>Addition / removal of neurons (Fig. 3)</title>
      <p>The variety of mutations used determines the complex nature of the movement of the learning algorithm on
the surface of the quality function. The essence of the proposed modification of the NEAT algorithm is to add a
mechanism for changing the intensity of mutations. It can be configured using the following four factors:
1. mutation_intensity - initial (and, subsequently, the current value of the intensity of mutations);
2.</p>
      <p>mutation_intensity_max - a maximum allowable value of intensity;
mutation_intensity_min - the minimum acceptable value of intensity, which is used when resetting the current
mutation, when the network exceeded the previous value of the fitness function;
mutation_intensity_step - step of the mutation intensity, by which the current intensity increases if the
network during mutations remains at the same value of the fitness function.</p>
      <p>The number of mutations that will be carried out on one individual will vary from 1 to the value of
mutation_intesity, that is, the current intensity of mutations. If the network is stuck in the learning process, the
mutation intensity will slowly increase, thereby increasing the number of mutations per generation in order to
accelerate the growth of the network. As soon as the network reaches a structure of higher complexity, and the value
of the fitness function begins to increase again, the intensity of mutations is reset to the minimum value, the speed of
mutations decreases so that the network does not create random extra connections and neurons.</p>
      <p>
        We will verify the performance of the modified NEAT algorithm by the example of modelling the logical
operation of “exclusive OR” (XOR) [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. The truth table of the XOR operator is shown in table 1.
ansij - the response of the neural network to the combination of ij at the inputs,
outij is the correct answer for the XOR operator when combining ij to the entrance.
      </p>
      <p>From a comparison of the configurations of the neural network at different stages of training, it can be seen
that weights are first set up, and when the increase in the value of the fitness function slows down significantly, new
neurons and connections are added. After that, setting the weights again becomes a priority.</p>
      <p>To obtain averaged characteristics, the neural network learning process was run 10 times for the NEAT
algorithm and the modified NEAT algorithm. The corresponding numbers of populations on which full network
training was achieved in each of the implementations are shown in Figs. 5 and 6.</p>
      <p>Fig. 5 - The number of the population on which the network is fully trained in modelling the XOR operator
for each of the implementations when learning by the NEAT algorithm.</p>
      <p>A comparison of the figures shows that the modified algorithm achieves complete network learning for a
smaller number of populations. Since the work of learning algorithms begins with random initial conditions and uses
random number generators when performing crossover and mutation operations, the NEAT algorithm in some
experiments also required a small number of populations. Figure 7 shows the learning curves averaged over 10
implementations for the NEAT algorithm and the modified NEAT algorithm when the neural network simulates the
operation of the XOR operator.</p>
      <p>Fig. 7 - Comparison of the learning speed of the neural network when modelling the XOR operator with the</p>
      <p>NEAT algorithm and the modified NEAT algorithm</p>
      <p>A comparison of the learning curves shown in Figure 7 shows a significant advantage of the modified
version of the algorithm.</p>
      <p>Usually, in practice, two processes are distinguished - training and the use of a neural network. We can train
many times on a special powerful computer. But, as a rule, it will be necessary to use it on another calculator, which
is either less powerful or loaded with other tasks. Therefore, in practice, you need to make a certain amount of training
and take the minimum configuration to use. Based on this, it is possible to compare the average number of experiments
with their generation of populations in each (more precisely, the total number of generations) that must be performed
in order to obtain the minimum configuration. Figure 8 shows the average number of generations needed to find a
solution depending on the intensity of mutations, and Figure 9 shows the average number of generations needed to
find the maximum of the quality function and the minimum configuration depending on the intensity of mutations.</p>
      <p>Fig. 8 - The average number of generations required to find a solution depending on the intensity of mutations</p>
      <p>Conclusions</p>
      <p>Additional use of the mechanism for controlling the intensity of mutations in the NEAT algorithm can
significantly increase the learning speed of the neural network in the task of modelling the XOR operator.</p>
      <p>This, in turn, leads to a decrease in the total amount of computation required to fully configure the neural
network and achieve a minimum configuration. However, due to the very large search space when solving complex
problems by the NEAT algorithm, further development of this algorithm is necessary for the direction of increasing
the learning speed and parallelizing operations for implementation on multiprocessor computers.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Goodfellow</surname>
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bengio</surname>
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Courville</surname>
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Deep</surname>
            <given-names>Learning</given-names>
          </string-name>
          , MIT Press,
          <year>2016</year>
          , http://www:deeplearningbook:org.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Angeline</surname>
            ,
            <given-names>P. J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Saunders</surname>
            ,
            <given-names>G. M.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Pollack</surname>
            ,
            <given-names>J. B.</given-names>
          </string-name>
          (
          <year>1993</year>
          ).
          <article-title>An evolutionary algorithm that constructs recurrent neural networks</article-title>
          .
          <source>IEEE Transactions on Neural Networks</source>
          ,
          <volume>5</volume>
          :
          <fpage>54</fpage>
          -
          <lpage>65</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Braun</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          <article-title>and</article-title>
          <string-name>
            <surname>Weisbrod</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          (
          <year>1993</year>
          ).
          <article-title>Evolving feedforward neural networks</article-title>
          . In Albrecht, R. F.,
          <string-name>
            <surname>Reeves</surname>
            ,
            <given-names>C. R.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Steele</surname>
          </string-name>
          , N. C., editors,
          <source>Proceedings of ANNGA93, International Conference on Artificial Neural Networks and Genetic Algorithms</source>
          , pages
          <fpage>25</fpage>
          -
          <lpage>32</lpage>
          , Springer-Verlag,
          <year>Innsbruck</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Dasgupta</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          and
          <string-name>
            <surname>McGregor</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          (
          <year>1992</year>
          ).
          <article-title>Designing application-specific neural networks using the structured genetic algorithm</article-title>
          . In Whitley, D. and
          <string-name>
            <surname>Schaffer</surname>
          </string-name>
          , J. D., editors,
          <source>Proceedings of the International Conference on Combinations of Genetic Algorithms and Neural Networks</source>
          , pages
          <fpage>87</fpage>
          -
          <lpage>96</lpage>
          , IEEE Press, Piscataway, New Jersey.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Opitz</surname>
            ,
            <given-names>D. W.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Shavlik</surname>
            ,
            <given-names>J. W.</given-names>
          </string-name>
          (
          <year>1997</year>
          ).
          <article-title>Connectionist theory refinement: Genetically searching the space of network topologies</article-title>
          .
          <source>Journal of Artificial Intelligence Research</source>
          ,
          <volume>6</volume>
          :
          <fpage>177</fpage>
          -
          <lpage>209</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Stanley</surname>
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Miikkulainen</surname>
            <given-names>R.</given-names>
          </string-name>
          ,
          <source>Evolving Neural Networks through Augmenting Topologies - 2002 by the Massachusetts Institute of Technology .-Evolutionary Computation</source>
          <volume>10</volume>
          (
          <issue>2</issue>
          ):
          <fpage>99</fpage>
          -
          <lpage>127</lpage>
          , http://nn.cs.utexas .edu/downloads/papers/stanley.ec02.pdf
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Miconi</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          (
          <year>2016</year>
          ).
          <article-title>Neural networks with differentiable structure</article-title>
          . Preprint at https://arxiv.org/abs/1606.06216
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Salimans</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ho</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sidor</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          &amp;
          <string-name>
            <surname>Openai</surname>
            ,
            <given-names>I. S.</given-names>
          </string-name>
          (
          <year>2017</year>
          ).
          <article-title>Evolution strategies as a scalable alternative to reinforcement learning</article-title>
          . Preprint at https://arxiv.org/abs/1703.03864
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>