<!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>
      <title-group>
        <article-title>Comparison of Deep Neural Network Learning Algorithms for Biomedical Image Processing</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Oleh Berezsky</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Petro Liashchynskyi</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Oleh Pitsun</string-name>
          <email>o.pitsun@wunu.edu.ua</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Pavlo Liashchynskyi</string-name>
          <email>pavloksmfcit@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mykola Berezkyy</string-name>
          <email>mykolaberezkyy@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>West Ukrainian National University</institution>
          ,
          <addr-line>11 Lvivska st., Ternopil, 46009</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2048</year>
      </pub-date>
      <abstract>
        <p>In recent years, the popularity of deep neural networks used for various problem-solving tasks has increased dramatically. The main tasks include image classification and synthesis using convolutional and generative-adversarial neural networks. These types of networks need large amounts of training data to achieve the required accuracy and performance. In addition, these networks have a long training time. The authors of the paper analyzed and compared the gradient-based neural network learning algorithms. The biomedical image classification with the use of a convolutional neural network of a given architecture was carried out. A comparison of learning algorithms (SGD, Adadelta, RMSProp, Adam, Adamax, Adagrad, and Nadam) was made according to the following parameters: training time, training loss, training accuracy, test loss, and test accuracy. For the experiments, the authors used the Python programming language, the Keras machine learning library, and the Google Colaboratory development environment, which provides free use of the Nvidia Tesla K80 graphics processor. For the experiments tracking and logging the authors used the Weights &amp; Biases service.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Machine learning</kwd>
        <kwd>CNN</kwd>
        <kwd>GAN</kwd>
        <kwd>optimization algorithms</kwd>
        <kwd>biomedical images</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
    </sec>
    <sec id="sec-2">
      <title>2. Literature review</title>
      <p>Learning algorithms are divided into first-order or second-order algorithms and evolutionary
algorithms. First-order algorithms are based on the calculation of the first derivative of the error
function. Therefore, these algorithms are also called gradient algorithms. Second-order algorithms use
the second derivative to select the direction of error minimization. Evolutionary algorithms are built
on the basis of genetic algorithms.</p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], the author analyzed the known gradient learning methods and provided their visualization.
      </p>
      <p>
        The authors of article [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] compared three evolutionary algorithms using a hybrid neural network
in forecasting downstream river flow based on areal precipitation.
      </p>
      <p>
        In the article [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], the authors compared several gradient optimization methods for a simple
convolutional neural network. The Nadam algorithm showed the best results.
      </p>
      <p>
        In the article [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], the author described the implementation of neural networks in the FPGA
environment. This implementation allows for speeding up the learning processes of neural networks
due to the use of parallel processing. As a learning algorithm, the author used a simple gradient
descent.
      </p>
      <p>
        In the research study [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], the author substantiated the relevance of improving neural network
training methods for object classification and segmentation problems. The author developed a method
that reduces the training time of neural networks based on nonlinear dynamics. The improved method
is based on the gradient descent method with delayed feedback.
      </p>
      <p>In these publications, researchers mostly paid attention to the analysis of existing algorithms.
Only some of the authors compared learning algorithms.</p>
      <p>Therefore, the limitations of these publications are that they only partially address the problem of
learning algorithms comparison. Most of the publications are just about learning algorithms review
when solving a bigger problem.</p>
      <p>
        The main goal of any learning algorithm is to minimize the learning error and optimize the
network parameters. Modern classifiers [
        <xref ref-type="bibr" rid="ref7">6, 7</xref>
        ] require large amounts of training data to achieve high
accuracy. In the work [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], the authors described the process of biomedical image classification and
synthesis using convolutional and generative-adversarial neural networks. The process of training
these networks is time-consuming. The training time can be reduced with an adequate selection of the
learning algorithm.
      </p>
      <p>Therefore, the actual task is the comparison of learning algorithms for biomedical image
classification.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Analysis of learning algorithms</title>
      <p>Modern algorithms for learning neural networks are based on error backpropagation and the
gradient descent method. These algorithms are called gradient or first-order algorithms.</p>
      <p>An important parameter of algorithms is the learning rate. This parameter controls how far to
move in the direction opposite to the gradient of the function in one step. If the learning rate is low,
the training time of the neural network can increase significantly. If the learning rate is high, the
neural network may not reach the minimum error value [9]. Formally, it can be presented as follows:
where θ refers to neural network parameters,
ɑ is a learning rate,</p>
      <p>is a gradient of the optimization function (loss).</p>
      <p>The disadvantage of gradient descent is that the network parameters can be updated only after
passing the full training dataset.</p>
      <p>Among other gradient learning algorithms, stochastic gradient descent and mini-batch gradient
descent are distinguished.</p>
      <p>Stochastic gradient descent (SGD) differs from the usual one in that the network parameters are
updated after each training iteration [10]. Therefore, when using this learning algorithm, the
parameters of the neural network are updated much more often.</p>
      <p>Mini-batch gradient descent uses data packets to update parameters [11]. The training dataset is
divided into packets of the same size. Then each of the packets is sent to the network input, the
gradient is calculated and the parameters are updated. Equation (1) can be represented in the
following way:
where</p>
      <p>is a package of training examples.</p>
      <sec id="sec-3-1">
        <title>Let us analyze the variations of gradient descent methods.</title>
        <p>Adagrad. The essence of this algorithm is that the learning rate adapts according to the network
parameters [12]. The algorithm sets a lower learning rate for parameters that are associated with
frequent features in the dataset. Then the equation with iterations will have the following form:
where is a diagonal matrix, where each of the diagonal elements is the sum of the squares of the
gradients with respect to the parameters θ at all previous iterations, including t,
is a parameter with a small value that prevents division by 0 (usually ),
is a gradient of the optimization function, .</p>
        <p>The advantage of this algorithm is that a researcher does not need to set the learning rate manually.
The authors use the default value for the learning rate, which is 1.0 [12].</p>
        <p>The disadvantage of the algorithm is an accumulation of gradients from previous iterations. This
leads to a decrease in the learning rate and a minor update of the network parameters.</p>
        <p>Adadelta. This algorithm is an improved version of the previous algorithm. The Adadelta
algorithm reduces the size of the matrix of accumulated gradients to a particular fixed value [13].
where RMS is a root mean square value,
is a gradient of the optimization function,</p>
        <p>The advantage of this algorithm is in no need for setting the initial value of the learning speed.</p>
        <p>RMSProp. This algorithm is similar to the Adadelta algorithm. It was developed by Geoffrey
Hinton [14]. The equations that describe the operation of the algorithm are as follows:</p>
        <p>RMSprop was developed at around the same time as Adadelta. These algorithms solve the problem
of monotonically decreasing learning rates in the Adagrad algorithm.</p>
        <p>Adam та Adamax. Unlike the two previous algorithms, in addition to the squares of the previous
gradients, the Adam algorithm also stores the previous gradients :
where</p>
        <p>are estimates of the mean and variance of the gradients, respectively [15].</p>
      </sec>
      <sec id="sec-3-2">
        <title>The rule for updating parameters in this algorithm is as follows: where , .</title>
      </sec>
      <sec id="sec-3-3">
        <title>The authors suggest the following values for the parameters:</title>
        <p>The Adamax is a variant of the Adam algorithm.</p>
        <p>Nadam. Nadam is a combination of RMSProp and Momentum algorithms. The first algorithm
accumulates the squares of the gradient values, and the second algorithm accumulates the values of
the previous gradients.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Dataset and augmentation</title>
      <p>A training set of cytological images with a size of 64x64 pixels was used for the experiments. The
initial dataset contains about 100 images. Therefore, the dataset was expanded to approximately 800
images using affine distortions. The Python programming language and the Rudi library [14] were
used to expand the training data set.</p>
      <p>Cytological images form a subset of biomedical images. Cytological images are images of cells of
the organism. Examples of cytological images are shown in Figure 1.</p>
      <p>
        Cytological image processing and analysis are reflected in works [
        <xref ref-type="bibr" rid="ref6">16-18</xref>
        ].
      </p>
    </sec>
    <sec id="sec-5">
      <title>5. CNN architecture design</title>
      <p>To compare the gradient descent-based training methods, a convolutional neural network model
was built. As an input, the network accepts color cytological images with a size of 64x64 pixels and
outputs a class label. The sequence of layers is given in Table 1.</p>
      <p>Layer param
kernel size = 5</p>
      <p>slope = 0.2
kernel size = 5
slope = 0.2
rate = 0.5
kernel size = 3</p>
      <p>slope = 0.2
kernel size = 3
slope = 0.2
rate = 0.5</p>
      <p>As can be seen from Table 1, the network consists of several repeating blocks. Each block consists
of a sequence of convolution layers, batch normalization, an activation layer, and a dropout layer.
Each convolutional layer reduces by half the input volume.</p>
      <p>The model is compiled using the categorical cross-entropy loss function. The number of learning
epochs is 30.</p>
      <p>The dataset is divided into learning and testing in the ratio of 80% to 20%. The batch size is set to
64.</p>
      <p>The Tensorflow 2 library and the Python programming language were used to build the model and
conduct experiments. The experiments were conducted in the Google Colaboratory environment on
an Nvidia Tesla K80 graphics processor.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Experiments</title>
      <p>The results of the optimization of neural network parameters based on gradient descent are shown
in Table 2.</p>
      <p>All optimizer parameters are set to the default values specified in the Tensorflow library. The
comparison of learning algorithms was made on the basis of the network training time, the value of
the loss function, and the classification accuracy on the test dataset. The results of the experiments are
shown in Table 3 and in the figures below.</p>
      <p>Figure 2 shows the error graphs and accuracy graphs on the training and test datasets for the Adam
optimizer. The accuracy curves on the training and test datasets show that the network is being
retrained. This happens because there is a significant difference in accuracy between the training and
test datasets. Accuracy on the training dataset was ~98%, and accuracy on the test dataset was</p>
      <p>Figure 3 also shows a significant difference between the accuracy values on the training and test
datasets: ~97% and ~75%, respectively.</p>
      <p>The classification accuracy for the model with the RMSprop optimizer on the training and test
datasets was ~97% and ~89%, respectively (fig.4).</p>
      <p>The model with the Nadam optimizer also demonstrates significant overtraining. Accuracy
on the training and test datasets is ~98% and 66%, respectively (fig.5).</p>
      <p>As can be seen from Figure 6, the error and accuracy graphs are quite smooth. However,
the classification accuracy on the training dataset was only ~73%. This is explained by
another problem, namely underfitting. There are several options for its solution, such as an
increase in the number of training epochs or an increase in the complexity of the used model.</p>
      <p>The accuracy values on the training and test data sets are almost the same for the model with the
Adagrad optimizer and equal to ~95% (fig.7).</p>
      <p>Figure 8 shows that the error and accuracy curves on the test dataset for almost all models are not
smooth, so the networks are retrained. This is evidenced by the significant difference in accuracy
values on the training and test datasets. This problem can be solved by simplifying the neural network
model or by increasing the number of images in the training dataset. On the other hand, the model
with the Adadelta optimizer has an inverse problem called underfitting. To solve this problem, several
techniques can be applied, such as increasing the complexity of the model or increasing the number of
training epochs.</p>
    </sec>
    <sec id="sec-7">
      <title>7. Conclusions</title>
      <sec id="sec-7-1">
        <title>The results of the study are as follows:</title>
        <p>1. The authors of the research study conducted a comparative analysis of the gradient
descentbased algorithms for optimizing neural network parameters (Adam, SGD, RMSprop, Nadam,
Adadelta, Adagrad, and Adamax). The comparison was made according to the criteria of network
training time, loss function values, and classification accuracy on the cytological image dataset.</p>
        <p>2. Based on the cytological image dataset and the developed convolutional neural network
model, the four best optimizers were selected according to the val_accuracy parameter: Adamax,
Adadelta, Adagrad, and RMSprop.</p>
        <p>3. The graphs of val_loss and val_accuracy on the test data set for optimizers (except Adadelta)
are not smooth. Unlike other algorithms, Adadelta is an optimization algorithm with an adaptive
learning rate. Therefore, parameters are updated with a smaller step, and during the training, there is
no problem with retraining. As a result, the accuracy and error curves on the training and test datasets
almost coincide and are smooth.</p>
        <p>4. Since Adadelta is an adaptive algorithm, it is necessary to use a higher training rate at the
beginning. This will significantly reduce the training time and ensure the convergence of the model.</p>
        <p>In this work, only one neural network model was used. In future research, it is planned to apply
discussed optimizers to more complex and huge models. The further research direction will also cover
the application of optimizers for generative-adversarial networks.</p>
      </sec>
    </sec>
    <sec id="sec-8">
      <title>8. References</title>
      <p>[9] Amari, Shun-ichi. "Backpropagation and stochastic gradient descent method."
Neurocomputing 5.4-5 (1993): 185-196. https://doi.org/10.1016/0925-2312(93)90006-O
[10] Ketkar, Nikhil. "Stochastic gradient descent." Deep learning with Python. Apress, Berkeley,
CA, 2017. 113-132.</p>
      <p>[11] Hinton, Geoffrey, Nitish Srivastava, and Kevin Swersky. "Neural networks for machine
learning lecture 6a overview of mini-batch gradient descent." Cited on 14.8 (2012): 2.</p>
      <p>[12] Duchi, J., Hazan, E., &amp; Singer, Y. (2011). Adaptive Subgradient Methods for Online
Learning and Stochastic Optimization. Journal of Machine Learning Research, 12, 2121–2159.
Retrieved from http://jmlr.org/papers/v12/duchi11a.html</p>
      <p>[13] Zeiler, M. D. (2012). ADADELTA: An Adaptive Learning Rate Method. URL:
http://arxiv.org/abs/1212.5701</p>
      <p>[14] Hinton, G., Srivastava, N., Swersky, K. Overview of mini-batch gradient descent. URL:
http://www.cs.toronto.edu/~tijmen/csc321/slides/lecture_slides_lec6.pdf</p>
      <p>
        [15] Kingma, D. P., &amp; Ba, J. L. (2015). Adam: a Method for Stochastic Optimization.
International Conference on Learning Representations, 1–13. https://arxiv.org/abs/1412.6980
[
        <xref ref-type="bibr" rid="ref6">16</xref>
        ] Berezsky, O., Pitsun, O., T. Dolynyuk, T., Dubchak, L., Savka, N., Melnyk, G. &amp; Teslyuk, V.
“Cytological Image Classification Using Data Reduction”. II International Workshop Informatics &amp;
Data-Driven Medicine (IDDM 2019). Lviv, Ukraine. November 11-13, 2019.
http://ceur-ws.org/Vol2488/paper2.pdf.
      </p>
      <p>[17] Berezsky, O., Pitsun, O., Datsko, T., Derysh, B., Tsmots, I. &amp; Tesluk, V. “Specified diagnosis
of breast cancer on the basis of immunogistochemical images analysis”, IDDM’2020: 3rd
International Conference on Informatics &amp; Data-Driven Medicine, November 19–21, 2020, Växjö,
Sweden. pp. 129-135. http://ceur-ws.org/Vol-2753/short5.pdf,</p>
      <p>[18] Berezsky, O., Pitsun, O., Dubchak, L., Berezka, K., Dolynyuk, T. &amp; Derish, B. Cytological
Images Clustering. In: Shakhovska N., Medykovskyy M.O. (eds) Advances in Intelligent Systems and
Computing V. CSIT 2020. Advances in Intelligent Systems and Computing. 2021; vol 1293. Springer,
Cham. https://doi.org/10.1007/978-3-030-63270-0_12.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Ruder</surname>
            ,
            <given-names>Sebastian. "</given-names>
          </string-name>
          <article-title>An overview of gradient descent optimization algorithms</article-title>
          .
          <source>" arXiv preprint arXiv:1609.04747</source>
          (
          <year>2016</year>
          ). URL: https://arxiv.org/abs/1609.04747
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>X.Y.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.W.</given-names>
            <surname>Chau</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.O.</given-names>
            <surname>Busari</surname>
          </string-name>
          .
          <article-title>A comparative study of population-based optimization algorithms for downstream river flow forecasting by a hybrid neural network model</article-title>
          ,
          <source>Engineering Applications of Artificial Intelligence</source>
          , Volume
          <volume>46</volume>
          ,
          <string-name>
            <surname>Part</surname>
            <given-names>A</given-names>
          </string-name>
          ,
          <year>2015</year>
          , Pages
          <fpage>258</fpage>
          -
          <lpage>268</lpage>
          , ISSN 0952-1976, https://doi.org/10.1016/j.engappai.
          <year>2015</year>
          .
          <volume>09</volume>
          .010.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>E. M.</given-names>
            <surname>Dogo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O. J.</given-names>
            <surname>Afolabi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N. I.</given-names>
            <surname>Nwulu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Twala</surname>
          </string-name>
          and
          <string-name>
            <given-names>C. O.</given-names>
            <surname>Aigbavboa</surname>
          </string-name>
          ,
          <article-title>"</article-title>
          <source>A Comparative Analysis of Gradient Descent-Based Optimization Algorithms on Convolutional Neural Networks," 2018 International Conference on Computational Techniques, Electronics and Mechanical Systems (CTEMS)</source>
          ,
          <year>2018</year>
          , pp.
          <fpage>92</fpage>
          -
          <lpage>99</lpage>
          , https://ieeexplore.ieee.org/document/8769211/
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Khuzhakhmetova</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Sh</surname>
            ,
            <given-names>A. V.</given-names>
          </string-name>
          <string-name>
            <surname>Semenyutina</surname>
            , and
            <given-names>V. A.</given-names>
          </string-name>
          <string-name>
            <surname>Semenyutina</surname>
          </string-name>
          .
          <article-title>"Deep neural network elements and their implementation in models of protective forest stands with the participation of shrubs."</article-title>
          <source>International journal of advanced trends in computer science and engineering 9</source>
          .4 (
          <year>2020</year>
          ):
          <fpage>6742</fpage>
          -
          <lpage>6746</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Smorodin</surname>
            <given-names>A. V.</given-names>
          </string-name>
          <article-title>Methods of learning neural networks based on nonlinear dynamics: diss</article-title>
          . dr.
          <source>Philos. Sciences: 122 / Smorodin Andriy Vyacheslavovich - Odesa</source>
          ,
          <year>2022</year>
          . - 169 p.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [16]
          <string-name>
            <surname>Simonyan</surname>
            , Karen, and
            <given-names>Andrew</given-names>
          </string-name>
          <string-name>
            <surname>Zisserman</surname>
          </string-name>
          .
          <article-title>"Very deep convolutional networks for largescale image recognition</article-title>
          .
          <source>" arXiv preprint arXiv:1409.1556</source>
          (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>He</surname>
          </string-name>
          ,
          <string-name>
            <surname>Kaiming</surname>
          </string-name>
          , et al.
          <article-title>"Deep residual learning for image recognition</article-title>
          .
          <source>" Proceedings of the IEEE conference on computer vision and pattern recognition</source>
          .
          <year>2016</year>
          . https://doi.org/10.1109/CVPR.
          <year>2016</year>
          .90
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Berezsky</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pitsun</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liashchynskyi</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Derysh</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Batryn</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          (
          <year>2023</year>
          ).
          <article-title>Computational Intelligence in Medicine</article-title>
          . In: Babichev,
          <string-name>
            <given-names>S.</given-names>
            ,
            <surname>Lytvynenko</surname>
          </string-name>
          , V. (eds) Lecture Notes in Data Engineering, Computational Intelligence,
          <article-title>and Decision Making</article-title>
          .
          <source>ISDMCI 2022. Lecture Notes on Data Engineering and Communications Technologies</source>
          , vol
          <volume>149</volume>
          . Springer, Cham. https://doi.org/10.1007/978-3-
          <fpage>031</fpage>
          - 16203-9_
          <fpage>28</fpage>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>