<!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>
      <journal-title-group>
        <journal-title>June</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Application of Ensemble Algorithms to Detect Anode Effects in Aluminum Production</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Anton Mikhalev</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nina Lugovaya</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Tatiana Penkova</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Iliya Puzanov</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Andrey Zavadyak</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute of Computational Modelling of the Siberian Branch of the Russian Academy of Sciences</institution>
          ,
          <addr-line>50/44 Akademgorodok, Krasnoyarsk, 660036</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>RUSAL Engineering and Technology Center</institution>
          ,
          <addr-line>37/1 Pogranichnikov st., Krasnoyarsk, 660111</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Siberian Federal University</institution>
          ,
          <addr-line>26, Kirenskogo st., Krasnoyarsk, 660074</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2021</year>
      </pub-date>
      <volume>25</volume>
      <issue>2021</issue>
      <fpage>0000</fpage>
      <lpage>0002</lpage>
      <abstract>
        <p>The article considers the approaches for automatically detecting process disruptions known as anode effects in aluminum electrolysis. The suggested method of their identification is based on using ensemble algorithms which are applied to data from immediate and daily average monitoring of reduction cells. The method includes the stage of preprocessing of daily-average inputs, aggregation of immediate and daily average parameters, and construction of a math model. The study determines the most informative parameters, while analyzing how algorithms and approaches featuring ensembles of decision trees stack up against each other. The quality metrics reveal the most effective algorithm for the set task.</p>
      </abstract>
      <kwd-group>
        <kwd>1 Ensemble algorithms</kwd>
        <kwd>detection of disruptions</kwd>
        <kwd>anode effects</kwd>
        <kwd>aluminum production</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        One of undesirable events arising from aluminum electrolysis is the anode effect. This
phenomenon may adversely affect the process of electrolysis leading to excessive power consumption
and temporary cell superheating. Moreover, whenever anode effects appear in the middle of
electrolysis, this results in the formation of greenhouse gases, as well as in occasional sparks and arc
discharges between the anode surface and electrolyte, which is hazardous for an operator addressing
the effects [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>
        Currently, a number of aluminum producers are developing technological strategies to find ways
to make their reduction cells operate without any anode effects. The possibility to detect them is one
of the top priority tasks concerning the aluminum production management. Traditionally, anode
effects are reduced by maintaining the concentration of alumina within the set range to ensure its most
consistent dissolving in the electrolyte, which is made possible by incorporating automatic adjustment
units into the automatic alumina handling system [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ]. The present-day approach to keeping the
number of anode effects to a minimum involves their timely detection and prediction. The state of the
process facilities is normally predicted by means of machine learning which allows identifying
specific correlations in the data and using them to find process disruptions in the cell operation.
      </p>
      <p>Algorithmic tools to detect the process disruptions are developed in the following stages: 1)
analysis and preprocessing of input data; 2) identification of informative features; 3) construction of a
math model and validation of results. Taking this into account, the body of the article is arranged
accordingly. Chapter 2 sets the task of classification. Chapter 3 presents the description of the input
data. Chapter 4 considers the applied methods of the input data preprocessing. Chapter 5 describes the
algorithms of classification. Chapter 6 presents the results of the applied classification models.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Research objective</title>
      <p>The classification task is set as follows. Let us assume that there is a set of objects  =
 ( ), … ,  ( ) ,
each
characterized
by
the
m-dimensional
vector
of
attributes  ( ) =

( ), … ,  ( ) ,  = 1,  . Each object under study is attributed to a certain class 
∈  =
{ , … ,  },  = 1,  . In this case, the classification is aimed at the following. It requires a rule
(algorithm) to be formulated  :</p>
      <p>→  , so that based on the set point value of attributes, new
unknown objects could be attributed to one of the classes.</p>
      <p>Being related to the problem of early detection of process disruptions based on the monitoring
data, the task of classification is reduced to dividing the states of the process facility into two classes:
operative  = 0 and faulty</p>
      <p>= 1 (functioning with errors). The input data samples are used as the
basis for an algorithm which must be able to use the set operative indicators of the given facility to
diagnose its state with sufficiently high accuracy.</p>
      <p>Binary classification tasks normally use the following indicators as their metrics:
</p>
      <p>accuracy is the relation of all the correctly classified objects to the total number of all the
classified objects:
=</p>
      <p>Here, TP stands for the true-positive results (objects classified as “positive” and which are actually
positive, i.e. belong to the class</p>
      <p>= 1), TN stands for the true-negative results (objects classified as
“negative” and which are actually negative, i.e. belong to the class  = 0), FP stands for the
falsepositive results (objects classified as “positive” but which are actually negative, i.e. belong to the class
 = 0), FN stands for the false-negative results (objects classified as “negative” but which are
actually positive, i.e. belong to the class 
items can be correctly classified by the model.
 1 = 2 ∗


+ 
∗ 
+</p>
      <p>Recall characterizes the ability of the given prediction model to correctly classify positive objects
from the set of all the positive objects combined.</p>
      <p>F1 score is the harmonic mean between the values of precision and recall:
(1)
(2)
(3)
(4)
(5)</p>
    </sec>
    <sec id="sec-3">
      <title>3. Description of inputs</title>
      <p>The state of the process facilities typically undergoes diagnostic scanning performed as the
ongoing monitoring of their current state, and whichever forms, it is manifested over time. The
fundamental principle of this diagnostic routine is in taking consistent and systematic measurements
of the parameters characterizing the running process at the facility, identifying changes in relation to
the standard indications, and their further classification.</p>
      <p>The key parameter to control anode effects is the value of voltage in the reduction cell. Anode
effects are known to be accompanied by a spike in voltage. However, checking the state of the
reduction cells and predicting the process deviations using the voltage parameter do not prove to be
highly effective. To ensure better predictive accuracy and to subsequently reduce the number of anode
effects, it is necessary to control the range of the parameters.</p>
      <p>
        The daily average data collected through monitoring the operation of cell series include the
following parameters: duration of metal tapping (sec), metal level (cm), electrolyte level (cm),
electrolyte temperature (°С), alumina dose (kg), bath chemistry parameters, parameters of the point
feeding system for alumina and aluminum fluoride, adjustment parameters of the anode-to-cathode
distance, amperage (kA), voltage parameters, back EMF (V), state and service life of cells (month).
Different time of discretization across the process parameters is one of the obstacles in controlling
aluminum electrolysis. Voltage is measured continuously, whereas other parameters are recorded only
once a day. Introducing these data into the prediction model entails selecting a suitable scheme for
their possible rearrangement when modeling the training set. The underlying strategy of this research
is the data aggregation presented earlier [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. The simulation is carried out as follows: instantaneous
values of voltage are averaged out every 10 minutes, the resulting averaged values are then combined
with the daily average data retrieved by the staff from sensors at the beginning of their night shift
(20:00). The research is based on the monitoring data from the experimental area of the Sayanogorsk
Aluminum Smelter, namely a series of reduction cells in potrooms No. 9 and 10. The input data
comprise the values of the process parameters for the period of 2020-2021. The output variable
represents information about the occurring disruptions (anode effects) in the process.
      </p>
    </sec>
    <sec id="sec-4">
      <title>4. Preprocessing of inputs</title>
      <p>The first stage of the daily average data processing involves the search for outliers across the data.
The outliers are found using the method of quartiles. The values identified as outliers are substituted
for by Nan. The next step is to reconstruct the missing data points. The first features to be removed
are those with the gaps exceeding the set threshold (over 50% of entries), and the remaining data are
then reiterated with the missing data points reconstructed by means of the EM-algorithm
(Expectation-maximization). This is followed by modeling the training set. The final stage is focused
on the most informative parameters indicating the occurrence of the anode effects. The datasets
contaminated with uninformative features lead to the model overfitting. The features are selected
using the method of recursive feature elimination (RFE) combined with the random forest algorithm.
The RFE method is based on the consecutive construction of models so that each step results in a
model and the feature which proves to be the least informative is eliminated from the set. This
eventually forms a set of the most significant features allowing one to detect the anode effects,
including the following: electrolyte level, electrolyte temperature, cryolite ratio, alumina dose, Fe
concentration, Mg concentration, metal level, duration and number of VIRA, duration and number of
MAINA, number of alumina doses in the automatic and manual mode, period of starvation, period of
oversaturation, and actual volume of the produced metal. Ошибка! Источник ссылки не найден.
gives the statistical description of the monitoring data (training and testing) for a reduction cell.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Description of algorithms</title>
      <p>
        Diagnostic models are built using a number of machine learning techniques. Most commonly, they
include decision trees [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], ensembles of algorithms [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], artificial neural networks [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], etc. In this
study, the prediction model features the ensembles of algorithms based on decision trees.
      </p>
      <p>
        Gradient boosted trees is an algorithm which uses an ensemble of decision trees where each
consecutive tree fits on the data on errors in the preceding decision tree. Gradient boosting involves
the serial construction of algorithms, where each successive algorithm tries to compensate the errors
in the composition of the previous ones. The resulting classifier is obtained as a linear combination of
the classifiers. The optimum linear combination coefficients are found using a greedy algorithm,
which implies the gradual addition of classifiers similar to the gradient descent. This study uses
XGBoost Classifier (XGBC) [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] and Catboost Classifier (Catboost) [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
      </p>
      <p>
        Bagging on decision trees is an algorithm which applies the bootstrap technique to an ensemble of
decision trees, with each of them built from the dataset generated from inputs. The classification
result is defined by voting. This study applies Balance Bagging Classifier (BBC) [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] and Balance
Random Forest Classifier (BRFC) [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
      </p>
      <p>The models are trained and tested using the generated dataset. The hyperparameters are tuned
through random search with cross validation. The parameters for the model are selected by means of
maximum precision. Tables 2-5 demonstrate the optimum values of the hyperparameters in each
model.</p>
      <sec id="sec-5-1">
        <title>The number of base estimators in the ensemble 290</title>
      </sec>
      <sec id="sec-5-2">
        <title>The number of samples to draw from X to train 1 each base estimator</title>
      </sec>
      <sec id="sec-5-3">
        <title>The number of features to draw from X to train 1 each base estimator</title>
      </sec>
      <sec id="sec-5-4">
        <title>Parameter name n_estimators max_depth learning_rate</title>
      </sec>
      <sec id="sec-5-5">
        <title>Parameter name iterations depth learning_rate</title>
      </sec>
      <sec id="sec-5-6">
        <title>Parameter name n_estimators max_samples max_features</title>
      </sec>
      <sec id="sec-5-7">
        <title>The number of trees in the forest 50</title>
      </sec>
      <sec id="sec-5-8">
        <title>The maximum depth of the tree 14</title>
      </sec>
      <sec id="sec-5-9">
        <title>The minimum number of samples required to 1 be at a leaf node</title>
      </sec>
      <sec id="sec-5-10">
        <title>The minimum number of samples required to 2 split an internal node</title>
      </sec>
      <sec id="sec-5-11">
        <title>The function to measure the quality of a split ‘gini’</title>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>6. Analysis and comparison of the results</title>
      <p>The model was fitted on the data divided into two sets, training and testing ones, in the following
proportion: the 2020 data were used for training, while the 2021 data were used for testing. The
results of the model training are presented in Table 6. The best results across the chosen metrics were
shown by the XGBoost Classifier model.</p>
      <p>As is seen in the matrix, in most cases the trained classifier detects the process disruptions
correctly, with 12 type I errors (when the anode effects are not detected by error) and 4 type II errors
(when the anode effects are falsely reported). When objects are classified according to one or another
class, the commonly used threshold value amounts to 0.5. However, this value is not always optimum,
for instance, as concerns the imbalanced data distribution in the inputs. The classifier threshold
controls the ratio between the False positive and the False negative instances. To reduce type I errors
(to increase the number of False positive instances and to reduce the False negative ones), the
threshold value was decreased to 0.3 (Figure 1b). Therefore, the XGBoost Classifier model was
selected for the purpose of predicting the anode effects, since the evaluation results suggest that the
model quality proves suitable for practical use.</p>
    </sec>
    <sec id="sec-7">
      <title>7. Conclusion</title>
      <p>The article presents the results of the study aimed at developing a detection toolkit for process
disruptions classified as anode effects based on ensembles of decision trees. The suggested models
predict deviations in the process of aluminum production using the combined data of immediate and
daily-average monitoring data. The method includes preprocessing the daily average inputs,
aggregating the immediate and daily-average data, and building a math model. The study reveals the
most informative parameters characterizing the current state of the facility, as well as how the
deviations develop, which allows predicting the process disruptions. XGBoost Classifier stands out
among other tested algorithms. The validated results suggest that the quality of this model is rather
high for practical use. Additional research on the inputs is required to ensure higher accuracy of the
prediction</p>
    </sec>
    <sec id="sec-8">
      <title>8. References</title>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>A.</given-names>
            <surname>Tabereaux</surname>
          </string-name>
          ,
          <article-title>Anode Effect and PFC Emission Rates</article-title>
          , in: Proceedings of the Eighth Australasian Aluminium Smelter Techn, New Zealand,
          <year>2004</year>
          , pp.
          <fpage>532</fpage>
          -
          <lpage>540</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>V.</given-names>
            <surname>Yu. Bazhin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. A.</given-names>
            <surname>Vlasov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. V.</given-names>
            <surname>Lupenkov</surname>
          </string-name>
          ,
          <article-title>Anode effect control on an aluminum electrolyzer</article-title>
          ,
          <source>Metallurgist</source>
          <volume>5</volume>
          (
          <year>2011</year>
          )
          <fpage>89</fpage>
          -
          <lpage>93</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>V.</given-names>
            <surname>Yu. Bazhin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. V.</given-names>
            <surname>Makushin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.V.</given-names>
            <surname>Saitov</surname>
          </string-name>
          ,
          <article-title>Conception of operating an aluminum electrolyzer without anode effect, Notes of the Mining Institute</article-title>
          , volume
          <volume>202</volume>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>K.</given-names>
            <surname>Zhou</surname>
          </string-name>
          , G. Xu,
          <string-name>
            <given-names>S.</given-names>
            <surname>Guo</surname>
          </string-name>
          ,
          <article-title>Anode effect prediction based on support vector machine and K nearest neighbor</article-title>
          ,
          <source>in: Chinese Automation Congress</source>
          ,
          <year>2017</year>
          , pp.
          <fpage>341</fpage>
          -
          <lpage>345</lpage>
          . doi:
          <volume>10</volume>
          .1109/CAC.
          <year>2017</year>
          .
          <volume>8242789</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>L.</given-names>
            <surname>Rokach</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Maimon</surname>
          </string-name>
          ,
          <article-title>Data Miningwith Decision Trees</article-title>
          .
          <source>Theory and Applications</source>
          , London, World Scientific Publishing Co,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>C.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <surname>Y. Ma,</surname>
          </string-name>
          <article-title>Ensemble machine learning: methods and applications</article-title>
          , USA, Springer,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>I.</given-names>
            <surname>Goodfellow</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Bengio</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Courville</surname>
          </string-name>
          , Deep learning,. Cambridge, MIT press,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>XGBoost</given-names>
            <surname>Classifier</surname>
          </string-name>
          , URL: https://xgboost.readthedocs.io/en/latest/.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Catboost</given-names>
            <surname>Classifier</surname>
          </string-name>
          , URL: https://catboost.ai/docs/concepts/pythonreference_ catboostclassifier.html.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>Balance</given-names>
            <surname>Bagging</surname>
          </string-name>
          <string-name>
            <surname>Classifier</surname>
          </string-name>
          , URL: https://imbalancedlearn.org/stable/references/generated/ imblearn.ensemble.BalancedBaggingClassifier.html.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>Balance</given-names>
            <surname>Random Forest Classifier</surname>
          </string-name>
          , URL: https://imbalancedlearn.org/stable/references /generated/imblearn.ensemble.BalancedRandomForestClassifier.html.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>