<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article">
 <front>
  <journal-meta>
   <journal-id journal-id-type="publisher-id">
    jcc
   </journal-id>
   <journal-title-group>
    <journal-title>
     Journal of Computer and Communications
    </journal-title>
   </journal-title-group>
   <issn pub-type="epub">
    2327-5219
   </issn>
   <issn publication-format="print">
    2327-5227
   </issn>
   <publisher>
    <publisher-name>
     Scientific Research Publishing
    </publisher-name>
   </publisher>
  </journal-meta>
  <article-meta>
   <article-id pub-id-type="doi">
    10.4236/jcc.2025.139007
   </article-id>
   <article-id pub-id-type="publisher-id">
    jcc-146115
   </article-id>
   <article-categories>
    <subj-group subj-group-type="heading">
     <subject>
      Articles
     </subject>
    </subj-group>
    <subj-group subj-group-type="Discipline-v2">
     <subject>
      Computer Science 
     </subject>
     <subject>
       Communications
     </subject>
    </subj-group>
   </article-categories>
   <title-group>
    Cybersecurity Modeling: Application of Optimization in Machine Learning-Based Detection Systems
   </title-group>
   <contrib-group>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Gloria A.
      </surname>
      <given-names>
       Odiaga
      </given-names>
     </name>
    </contrib>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Newton
      </surname>
      <given-names>
       Masinde
      </given-names>
     </name>
    </contrib>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Castro
      </surname>
      <given-names>
       Yoga
      </given-names>
     </name>
    </contrib>
   </contrib-group> 
   <aff id="affnull">
    <addr-line>
     aSchool of Informatics and Innovative Systems, Jaramogi Oginga Odinga University of Science and Technology, Bondo, Kenya
    </addr-line> 
   </aff> 
   <pub-date pub-type="epub">
    <day>
     03
    </day> 
    <month>
     09
    </month>
    <year>
     2025
    </year>
   </pub-date> 
   <volume>
    13
   </volume> 
   <issue>
    09
   </issue>
   <fpage>
    121
   </fpage>
   <lpage>
    140
   </lpage>
   <history>
    <date date-type="received">
     <day>
      31,
     </day>
     <month>
      July
     </month>
     <year>
      2025
     </year>
    </date>
    <date date-type="published">
     <day>
      25,
     </day>
     <month>
      July
     </month>
     <year>
      2025
     </year> 
    </date> 
    <date date-type="accepted">
     <day>
      25,
     </day>
     <month>
      September
     </month>
     <year>
      2025
     </year> 
    </date>
   </history>
   <permissions>
    <copyright-statement>
     © Copyright 2014 by authors and Scientific Research Publishing Inc. 
    </copyright-statement>
    <copyright-year>
     2014
    </copyright-year>
    <license>
     <license-p>
      This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/
     </license-p>
    </license>
   </permissions>
   <abstract>
    Mathematical optimization is a fundamental aspect of machine learning (ML). An ML task can be conceptualized as optimizing a specific objective using the training dataset to discern patterns and to predict and generalize on new, unseen data through testing. The reliability of optimization in addressing these tasks is fundamental to the efficacy of ML solutions, which has prompted the exploration of complex ML tasks with advanced mathematical approaches and substantially larger datasets. As dataset sizes grow, training complex models can take longer, even with high-performance hardware, qualifying the need for efficient optimization techniques and the performance enhancement of existing optimization methods. This study discusses optimization techniques and their application in ML and deep learning (DL). By framing the detection task as an optimization problem, the study proposes a systematic framework that includes mathematical modeling of the problem. The study also emphasizes the importance of selecting appropriate optimization methods across model development in architectural design, training, and tuning procedures, grounded in the mathematical modeling of a cyberattack detection task to ensure optimal performance in securing web-based systems. The experimental results on a Long Short-Term Memory (LSTM) model show an accuracy of 0.947, a False Negative (FN) rate of 0.053, and a False Positive (FP) rate of 0.011, hence demonstrating that integrating the proposed framework in cybersecurity model design can enhance the attack detection performance.
   </abstract>
   <kwd-group> 
    <kwd>
     Optimization
    </kwd> 
    <kwd>
      Cybersecurity
    </kwd> 
    <kwd>
      Machine Learning
    </kwd> 
    <kwd>
      Deep Learning
    </kwd> 
    <kwd>
      Constraint
    </kwd> 
    <kwd>
      Domain Set
    </kwd> 
    <kwd>
      Objective Function
    </kwd> 
    <kwd>
      Variable
    </kwd> 
    <kwd>
      Cyberattack
    </kwd>
   </kwd-group>
  </article-meta>
 </front>
 <body>
  <sec id="s1">
   <title>1. Introduction</title>
   <p>Historically, optimization theory was introduced by Kantorovich in 1960, who advocated obtaining an optimum solution to a presented problem by applying a definite, scientifically based method. Optimization is a discipline that studies how actions are chosen to achieve objectives optimally <xref ref-type="bibr" rid="scirp.146115-1">
     [1]
    </xref>. Optimization delineates the methodology or process of improving a system’s or network’s efficacy or functionality <xref ref-type="bibr" rid="scirp.146115-2">
     [2]
    </xref>. Optimization generally entails the modification of variables to maximize or minimize a specific objective function while simultaneously balancing the constraints of the problem. DL is a specialized branch of ML that harnesses neural networks to autonomously analyze datasets, allowing computer systems to achieve refined performance through experience and continuous data exposure <xref ref-type="bibr" rid="scirp.146115-3">
     [3]
    </xref>. DL algorithms outperform traditional ML in cyberattack detection, leveraging their multi-layered structure and powerful extraction techniques to efficiently derive meaningful insights from training data <xref ref-type="bibr" rid="scirp.146115-4">
     [4]
    </xref>. Challenges with most deep learning algorithms include lengthy training periods, manual parameter optimization, and accuracy deficiencies in detection <xref ref-type="bibr" rid="scirp.146115-4">
     [4]
    </xref> <xref ref-type="bibr" rid="scirp.146115-5">
     [5]
    </xref>.</p>
   <p>Optimization is crucial in refining deep learning algorithms for improved efficiency and reliability for optimal performance. In cybersecurity, optimization techniques ensure that detection models can accurately identify threats while reducing false positives and computational overheads <xref ref-type="bibr" rid="scirp.146115-6">
     [6]
    </xref>. Optimization is valuable not because it seeks to understand every system detail, but because it identifies the most efficient way to refine and adjust it with minimal effort <xref ref-type="bibr" rid="scirp.146115-7">
     [7]
    </xref>. Optimization, in its simplest form, is about selecting inputs that will result in the best possible outputs of a given system. Optimization techniques help analyze the operational space and forecast the necessary adjustments to system parameters, ensuring peak performance <xref ref-type="bibr" rid="scirp.146115-7">
     [7]
    </xref>. The choice between stochastic and deterministic optimization methods relies on factors such as the demand for computational efficiency, the complexity of a problem, and the precision of available system data <xref ref-type="bibr" rid="scirp.146115-8">
     [8]
    </xref>.</p>
   <p>In stochastic optimization, the techniques applied lack predictability in the search process, such as through approximations. In contrast, deterministic optimization methods follow a fixed, predictable path to find a solution, relying on precise calculations of gradients or other problem-specific derivatives <xref ref-type="bibr" rid="scirp.146115-9">
     [9]
    </xref>. This integration of randomness generalizes stochastic optimization, as randomness can be incorporated using various mechanisms <xref ref-type="bibr" rid="scirp.146115-8">
     [8]
    </xref>. There are different classes of stochastic optimization algorithms, as indicated in the following.</p>
   <p>1) Simulated Annealing (SA): This is a probabilistic technique modeled according to the annealing process in metallurgy, symbolizing the physical process of heating and cooling metals <xref ref-type="bibr" rid="scirp.146115-10">
     [10]
    </xref>. After identifying a search space, the SA algorithm comprehensively explores different combinations to find an optimal solution.</p>
   <p>2) Particle Swarm Optimization (PSO): This draws inspiration from the collective dynamics of natural swarms, such as the flocking of birds, where the movement of particles is simulated within a search space to find an optimal solution <xref ref-type="bibr" rid="scirp.146115-11">
     [11]
    </xref> <xref ref-type="bibr" rid="scirp.146115-12">
     [12]
    </xref>.</p>
   <p>3) Game Theory-based optimization (GT): GT-based methods seek to simulate the dynamics of a game with players pursuing individual goals, grounded in the principles of Nash’s game theory <xref ref-type="bibr" rid="scirp.146115-13">
     [13]
    </xref> <xref ref-type="bibr" rid="scirp.146115-14">
     [14]
    </xref>.</p>
   <p>4) Evolutionary Algorithms (EA): EAs are techniques inspired by the replication of the evolutionary process as articulated in Darwin’s theory of natural selection <xref ref-type="bibr" rid="scirp.146115-15">
     [15]
    </xref> <xref ref-type="bibr" rid="scirp.146115-16">
     [16]
    </xref>. Genetic Algorithms (GA) are a subset of EA that mimic natural evolution to achieve optimal solutions to complex problems through successive iterations of multiple potential solutions <xref ref-type="bibr" rid="scirp.146115-17">
     [17]
    </xref>.</p>
   <p>A key benefit of stochastic optimization is its ability to navigate beyond local minima and thoroughly explore the design space due to its inherent randomness <xref ref-type="bibr" rid="scirp.146115-18">
     [18]
    </xref>. The challenge is reconciling the comprehensive exploration of the solution space with the timely convergence to an optimal solution <xref ref-type="bibr" rid="scirp.146115-19">
     [19]
    </xref>.</p>
   <p>Algorithm tuning involves continuous adjustment of various control parameters <xref ref-type="bibr" rid="scirp.146115-20">
     [20]
    </xref>, significantly influencing an algorithm’s performance <xref ref-type="bibr" rid="scirp.146115-21">
     [21]
    </xref>. Stochastic optimization algorithms mainly draw inspiration from natural processes and adaptations to solve optimization <xref ref-type="bibr" rid="scirp.146115-22">
     [22]
    </xref>. The formulation of a specific optimization problem and its environment influence the performance of the applied optimization technique <xref ref-type="bibr" rid="scirp.146115-23">
     [23]
    </xref>. Stochastic optimization techniques generally offer advanced methods for solving optimization problems <xref ref-type="bibr" rid="scirp.146115-24">
     [24]
    </xref>.</p>
   <p>The optimization techniques proposed in our framework are well-grounded practices. However, their strategic integration for cyberattack detection, by aligning architectural design, training procedures, and tuning dynamics, presents a unified approach to cybersecurity modeling. In contrast to previous studies (discussed in Section 2), which concentrate exclusively on enhancing a single phase of the model life cycle or utilize generic parameter optimization, the framework in this study establishes a unified, mathematically defined optimization pipeline that fluidly incorporates feature selection, hyperparameter optimization, gradient-based training, and regularization for the CI-CIDS-2017 dataset and web-based attack profiles.</p>
   <p>The justification for this integrated methodology is to address practical constraints related to class imbalance, convergence efficiency, and real-time detection rates in high-traffic scenarios. Comparative experiments (section 6.3) demonstrate that the fully integrated approach achieves a false positive rate of 1.1% and a false negative rate of 5.3%, representing measurable enhancements over a baseline LSTM model lacking staged optimization, which recorded false positive and false negative rates of 3.4% and 8.9%, respectively.</p>
   <p>This paper is structured as follows: Section 2 presents the related studies on optimization in cyberattack detection. Section 3 discusses the general optimization problem modeling task. Section 4 highlights the mathematical modeling of the cyberattack detection task as an optimization problem. Section 5 draws attention to the experimental design, while Section 6 discusses the study results. Finally, Section 7 gives the conclusions of the study.</p>
  </sec><sec id="s2">
   <title>2. Related Studies</title>
   <p>ML has been an optimal area for algorithm optimization, but it has also led to more research in optimization methods <xref ref-type="bibr" rid="scirp.146115-25">
     [25]
    </xref> <xref ref-type="bibr" rid="scirp.146115-26">
     [26]
    </xref>. ML focuses on making machines learn from experience. Learning involves using observations to search for an environment’s model and predict new queries for a problem <xref ref-type="bibr" rid="scirp.146115-26">
     [26]
    </xref>. In the earlier days of ML, there was more emphasis on models catering to specifically identified input data structures due to low computational capabilities and limited data access, which allowed the design of models to specifically leverage data structures and tune them for tasks with small data amounts <xref ref-type="bibr" rid="scirp.146115-27">
     [27]
    </xref>. The merit was that it facilitated the models’ comprehensive theoretical analysis and guaranteed the models’ performance <xref ref-type="bibr" rid="scirp.146115-28">
     [28]
    </xref>.</p>
   <p>Using off-the-shelf algorithms to search for optimal models is possible, but new optimization models must be designed specifically for the particular problem, enhancing ML efficiency <xref ref-type="bibr" rid="scirp.146115-29">
     [29]
    </xref>. Alternatively, with improved computational capabilities and larger amounts of data, it has been possible to utilize more flexible and complex models, such as Deep Neural Networks (DNN). Regardless of complex models requiring more resources and data to fit appropriately to the data and problem, the advantage is that similar models may be adopted without modifying them for specific problems, thus they perform better in real-world problems.</p>
   <p>Previous decades have witnessed a shift in how intelligent systems are designed <xref ref-type="bibr" rid="scirp.146115-30">
     [30]
    </xref>. Rather than mimicking human decision-making, machine design mimics the human learning process. Such a framework involves a model with variables from appropriate data specific to the problem or task. Popular optimization approaches are applicable in addressing the learning problem in the case of ML and DL <xref ref-type="bibr" rid="scirp.146115-31">
     [31]
    </xref>. Also, the adoption of generic optimization may be inefficient due to the problem’s scale on the loss function and output space. To address a dataset’s large size, optimization methods’ stochastic variants that only work with a subset of the dataset at a time have been popularized <xref ref-type="bibr" rid="scirp.146115-8">
     [8]
    </xref>. Further, dealing with complexity in loss functions and output space associated with the learning problem calls for developing methods that leverage the structure respective to the task to enhance the optimization’s efficiency. ML optimization encompasses a broader range of techniques, such as neural networks, support vector machines (SVM), linear and logistic regression <xref ref-type="bibr" rid="scirp.146115-32">
     [32]
    </xref>.</p>
   <p>In the context of cyberattack detection, several studies have utilized optimization, such as Brindha et al. <xref ref-type="bibr" rid="scirp.146115-33">
     [33]
    </xref>, who applied optimized deep learning approaches; Do et al. <xref ref-type="bibr" rid="scirp.146115-34">
     [34]
    </xref>, who studied optimization using ML; Injadat et al. <xref ref-type="bibr" rid="scirp.146115-32">
     [32]
    </xref>, who researched a multi-stage optimized ML framework; Nayak et al. <xref ref-type="bibr" rid="scirp.146115-35">
     [35]
    </xref>, who studied an ML and Bayesian optimization-driven intelligent framework for Internet of Medical Things (IoMT) cyberattack detection; and Zhang et al. <xref ref-type="bibr" rid="scirp.146115-36">
     [36]
    </xref>, who focused on low-rate DoS attack detection using Power Spectral Density (PSD)-based entropy and ML. However, most of these works either lack a unified optimization framework or do not fully address practical constraints concerning hyper-parameter tuning, class imbalance, and real-time attack detection. This study, therefore, aims to focus on these challenges by considering the optimization lifecycle of cyberattack detection under practical constraints.</p>
  </sec><sec id="s3">
   <title>3. The General Optimization Problem</title>
   <p>
    <xref ref-type="bibr" rid="scirp.146115-"></xref>The following discussion provides a general definition of the optimization problem. In a task requiring predicting a 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       y 
     </mi> 
    </math> variable that depends on 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       x 
     </mi> 
    </math> input, the application of ML essentially involves two computational problems. In the assumption as presented in Equation (1), that:</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        y 
      </mi> 
      <mo>
        = 
      </mo> 
      <mi>
        f 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          x 
        </mi> 
        <mo>
          ; 
        </mo> 
        <mi>
          θ 
        </mi> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> (1)</p>
   <p>where the 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       f 
     </mi> 
    </math> function maps input to output and has 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       θ 
     </mi> 
    </math> as the parameters, then the initial computation problem is the computation of the 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       y 
     </mi> 
    </math> output by evaluation of 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        f 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          x 
        </mi> 
        <mo>
          ; 
        </mo> 
        <mi>
          θ 
        </mi> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> at 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       x 
     </mi> 
    </math> input, which is called the inference or prediction problem.</p>
   <p>Secondly, if given data 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       D 
     </mi> 
    </math>, parameters 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       θ 
     </mi> 
    </math> of function 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       f 
     </mi> 
    </math> may be estimated in Equation (2) as:</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msup> 
       <mi>
         θ 
       </mi> 
       <mo>
         * 
       </mo> 
      </msup> 
      <mo>
        = 
      </mo> 
      <mi>
        arg 
      </mi> 
      <msub> 
       <mrow> 
        <mi>
          min 
        </mi> 
       </mrow> 
       <mi>
         θ 
       </mi> 
      </msub> 
      <mi>
        L 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          f 
        </mi> 
        <mo>
          , 
        </mo> 
        <mi>
          D 
        </mi> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math>(2)</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       L 
     </mi> 
    </math> is the loss function measuring the parameter configuration quality, which is called the learning problem. In general, the learning and inference problems may be seen as optimization problems in ML and DL. The inference problem involves choosing an output 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       y 
     </mi> 
    </math> from a set 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       Y 
     </mi> 
    </math>, maximizing a score estimating the prediction’s quality as in Equation (3):</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msup> 
       <mi>
         y 
       </mi> 
       <mo>
         * 
       </mo> 
      </msup> 
      <mo>
        = 
      </mo> 
      <munder> 
       <mrow> 
        <mi>
          arg 
        </mi> 
        <mi>
          min 
        </mi> 
       </mrow> 
       <mrow> 
        <mi>
          y 
        </mi> 
        <mo>
          ∈ 
        </mo> 
        <mi>
          Y 
        </mi> 
       </mrow> 
      </munder> 
      <mtext>
        score 
      </mtext> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          x 
        </mi> 
        <mo>
          , 
        </mo> 
        <mi>
          y 
        </mi> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> (3)</p>
   <p>The 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       Y 
     </mi> 
    </math> domain differs for each task. For a classification problem, the set would be categorical, but for a regression task, it would be a continuous space. The domain set may be sophisticated, such as the possible rankings of a set in ranked retrieval tasks. Whereas deploying off-the-shelf optimization models to solve inference problems is possible, other cases require the development of new optimization models to leverage the problem’s structure to solve it effectively.</p>
   <p>For the learning problem in a standard setting, according to Equation (4), parameters 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       θ 
     </mi> 
    </math> of the model 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        f 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          x 
        </mi> 
        <mo>
          ; 
        </mo> 
        <mi>
          θ 
        </mi> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> are selected since the loss function’s expected value 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        L 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          f 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            x 
          </mi> 
          <mo>
            ; 
          </mo> 
          <mi>
            θ 
          </mi> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          , 
        </mo> 
        <mi>
          y 
        </mi> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> is minimized by the model over the data distribution 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         P 
       </mi> 
       <mrow> 
        <mi>
          d 
        </mi> 
        <mi>
          a 
        </mi> 
        <mi>
          t 
        </mi> 
        <mi>
          a 
        </mi> 
       </mrow> 
      </msub> 
     </mrow> 
    </math>.</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msup> 
       <mi>
         θ 
       </mi> 
       <mo>
         * 
       </mo> 
      </msup> 
      <mo>
        = 
      </mo> 
      <munder> 
       <mrow> 
        <mi>
          arg 
        </mi> 
        <mi>
          min 
        </mi> 
       </mrow> 
       <mi>
         θ 
       </mi> 
      </munder> 
      <msub> 
       <mi>
         E 
       </mi> 
       <mrow> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            x 
          </mi> 
          <mo>
            , 
          </mo> 
          <mi>
            y 
          </mi> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          ~ 
        </mo> 
        <msub> 
         <mi>
           P 
         </mi> 
         <mrow> 
          <mi>
            d 
          </mi> 
          <mi>
            a 
          </mi> 
          <mi>
            t 
          </mi> 
          <mi>
            a 
          </mi> 
         </mrow> 
        </msub> 
       </mrow> 
      </msub> 
      <mrow> 
       <mo>
         [ 
       </mo> 
       <mrow> 
        <mi>
          L 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            f 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <mi>
              x 
            </mi> 
            <mo>
              ; 
            </mo> 
            <mi>
              θ 
            </mi> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <mo>
            , 
          </mo> 
          <mi>
            y 
          </mi> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mrow> 
       <mo>
         ] 
       </mo> 
      </mrow> 
     </mrow> 
    </math> (4)</p>
   <p>The risk is the objective of the optimization problem <xref ref-type="bibr" rid="scirp.146115-28">
     [28]
    </xref>, and in computing, this requires knowledge of the data distribution 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         P 
       </mi> 
       <mrow> 
        <mi>
          d 
        </mi> 
        <mi>
          a 
        </mi> 
        <mi>
          t 
        </mi> 
        <mi>
          a 
        </mi> 
       </mrow> 
      </msub> 
     </mrow> 
    </math>, which is generally not known. Hence, an empirical estimate is optimized as the loss function expectation on the training data 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         D 
       </mi> 
       <mrow> 
        <mi>
          t 
        </mi> 
        <mi>
          r 
        </mi> 
        <mi>
          a 
        </mi> 
        <mi>
          i 
        </mi> 
        <mi>
          n 
        </mi> 
       </mrow> 
      </msub> 
     </mrow> 
    </math> known as empirical risk, as in Equation (5).</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msup> 
       <mi>
         θ 
       </mi> 
       <mo>
         * 
       </mo> 
      </msup> 
      <mo>
        = 
      </mo> 
      <munder> 
       <mrow> 
        <mi>
          arg 
        </mi> 
        <mi>
          min 
        </mi> 
       </mrow> 
       <mi>
         θ 
       </mi> 
      </munder> 
      <mfrac> 
       <mn>
         1 
       </mn> 
       <mrow> 
        <mrow> 
         <mo>
           | 
         </mo> 
         <mrow> 
          <msub> 
           <mi>
             D 
           </mi> 
           <mrow> 
            <mi>
              t 
            </mi> 
            <mi>
              r 
            </mi> 
            <mi>
              a 
            </mi> 
            <mi>
              i 
            </mi> 
            <mi>
              n 
            </mi> 
           </mrow> 
          </msub> 
         </mrow> 
         <mo>
           | 
         </mo> 
        </mrow> 
       </mrow> 
      </mfrac> 
      <mstyle displaystyle="true"> 
       <munder> 
        <mo>
          ∑ 
        </mo> 
        <mrow> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             x 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             y 
           </mi> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           ∈ 
         </mo> 
         <msub> 
          <mi>
            D 
          </mi> 
          <mrow> 
           <mi>
             t 
           </mi> 
           <mi>
             r 
           </mi> 
           <mi>
             a 
           </mi> 
           <mi>
             i 
           </mi> 
           <mi>
             n 
           </mi> 
          </mrow> 
         </msub> 
        </mrow> 
       </munder> 
       <mrow> 
        <mi>
          L 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            f 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <mi>
              x 
            </mi> 
            <mo>
              ; 
            </mo> 
            <mi>
              θ 
            </mi> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <mo>
            , 
          </mo> 
          <mi>
            y 
          </mi> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mrow> 
      </mstyle> 
     </mrow> 
    </math> (5)</p>
   <p>Whereas the training set is only used for model training, it is surmised that it performs efficiently on unseen data in the selected distribution. A model’s overall performance may be evaluated using the testing data, 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         D 
       </mi> 
       <mrow> 
        <mi>
          t 
        </mi> 
        <mi>
          e 
        </mi> 
        <mi>
          s 
        </mi> 
        <mi>
          t 
        </mi> 
       </mrow> 
      </msub> 
     </mrow> 
    </math>, to determine risk. A learning algorithm that overfits the training set model will result in negative overall performance. However, overfitting can be addressed by adding additional regularization to the equation’s objective function.</p>
   <p>The relationship between an independent and dependent variable, 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       x 
     </mi> 
    </math> and 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       y 
     </mi> 
    </math>, respectively, such as in linear regression, with 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       n 
     </mi> 
    </math> observations in a given dataset, 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mrow> 
       <mo>
         { 
       </mo> 
       <mrow> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <msub> 
           <mi>
             x 
           </mi> 
           <mn>
             1 
           </mn> 
          </msub> 
          <mo>
            , 
          </mo> 
          <msub> 
           <mi>
             y 
           </mi> 
           <mn>
             1 
           </mn> 
          </msub> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          , 
        </mo> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <msub> 
           <mi>
             x 
           </mi> 
           <mn>
             2 
           </mn> 
          </msub> 
          <mo>
            , 
          </mo> 
          <msub> 
           <mi>
             y 
           </mi> 
           <mn>
             2 
           </mn> 
          </msub> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          , 
        </mo> 
        <mo>
          ⋯ 
        </mo> 
        <mo>
          , 
        </mo> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <msub> 
           <mi>
             x 
           </mi> 
           <mi>
             n 
           </mi> 
          </msub> 
          <mo>
            , 
          </mo> 
          <msub> 
           <mi>
             y 
           </mi> 
           <mi>
             n 
           </mi> 
          </msub> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mrow> 
       <mo>
         } 
       </mo> 
      </mrow> 
     </mrow> 
    </math>, aims to identify the parameters 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       w 
     </mi> 
    </math> as in Equation (6) where:</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          w 
        </mi> 
        <mo>
          , 
        </mo> 
        <msub> 
         <mi>
           x 
         </mi> 
         <mi>
           i 
         </mi> 
        </msub> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <msub> 
       <mi>
         y 
       </mi> 
       <mi>
         i 
       </mi> 
      </msub> 
      <mo>
        , 
      </mo> 
      <mo>
        ∀ 
      </mo> 
      <mi>
        i 
      </mi> 
     </mrow> 
    </math> (6)</p>
   <p>The inner product of 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       w 
     </mi> 
    </math> and 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       x 
     </mi> 
    </math> is represented by 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          w 
        </mi> 
        <mo>
          , 
        </mo> 
        <mi>
          x 
        </mi> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math>. If the relationship between x and 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       y 
     </mi> 
    </math> is non-linear, then the problem may be unsolvable. This can be avoided by getting the parameters of 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       w 
     </mi> 
    </math> as close as possible to 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       y 
     </mi> 
    </math> (average), as in Equation (7):</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mrow> 
        <mi>
          min 
        </mi> 
       </mrow> 
       <mi>
         w 
       </mi> 
      </msub> 
      <mi>
        f 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         w 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mfrac> 
       <mn>
         1 
       </mn> 
       <mi>
         n 
       </mi> 
      </mfrac> 
      <mstyle displaystyle="true"> 
       <msubsup> 
        <mo>
          ∑ 
        </mo> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           = 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mi>
          n 
        </mi> 
       </msubsup> 
       <mrow> 
        <msup> 
         <mrow> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mrow> 
              <mi>
                w 
              </mi> 
              <mo>
                , 
              </mo> 
              <msub> 
               <mi>
                 x 
               </mi> 
               <mi>
                 i 
               </mi> 
              </msub> 
             </mrow> 
             <mo>
               ) 
             </mo> 
            </mrow> 
            <mo>
              − 
            </mo> 
            <msub> 
             <mi>
               y 
             </mi> 
             <mi>
               i 
             </mi> 
            </msub> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
         <mn>
           2 
         </mn> 
        </msup> 
       </mrow> 
      </mstyle> 
     </mrow> 
    </math> (7)</p>
   <p>Designing ML tasks as optimization problems can be done, as in Equation (8), in the following form:</p>
   <p>
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mrow> 
        <mi>
          min 
        </mi> 
       </mrow> 
       <mi>
         w 
       </mi> 
      </msub> 
      <mi>
        f 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         w 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mfrac> 
       <mn>
         1 
       </mn> 
       <mi>
         n 
       </mi> 
      </mfrac> 
      <mstyle displaystyle="true"> 
       <munderover> 
        <mo>
          ∑ 
        </mo> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mi>
          n 
        </mi> 
       </munderover> 
       <mrow> 
        <msub> 
         <mi>
           f 
         </mi> 
         <mi>
           i 
         </mi> 
        </msub> 
       </mrow> 
      </mstyle> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          w 
        </mi> 
        <mo>
          ; 
        </mo> 
        <msub> 
         <mi>
           x 
         </mi> 
         <mi>
           i 
         </mi> 
        </msub> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> (8)</p>
   <p>where 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mrow> 
       <mo>
         { 
       </mo> 
       <mrow> 
        <msub> 
         <mi>
           x 
         </mi> 
         <mi>
           i 
         </mi> 
        </msub> 
       </mrow> 
       <mo>
         } 
       </mo> 
      </mrow> 
     </mrow> 
    </math> is data from an unknown probability distribution 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       p 
     </mi> 
    </math>. In ML and DL systems, each term 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         f 
       </mi> 
       <mi>
         i 
       </mi> 
      </msub> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          w 
        </mi> 
        <mo>
          ; 
        </mo> 
        <msub> 
         <mi>
           x 
         </mi> 
         <mi>
           i 
         </mi> 
        </msub> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> shows how a model with parameters 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       w 
     </mi> 
    </math> fits a particular observation 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         x 
       </mi> 
       <mi>
         i 
       </mi> 
      </msub> 
     </mrow> 
    </math>. With a dataset 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         D 
       </mi> 
       <mi>
         a 
       </mi> 
      </msub> 
     </mrow> 
    </math> having 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       n 
     </mi> 
    </math> samples 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mrow> 
       <mo>
         { 
       </mo> 
       <mrow> 
        <msub> 
         <mi>
           x 
         </mi> 
         <mi>
           i 
         </mi> 
        </msub> 
       </mrow> 
       <mo>
         } 
       </mo> 
      </mrow> 
     </mrow> 
    </math>, 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        f 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         w 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> identifies how well the model fits the entire corpus of data on average. This is an empirical risk minimization problem, which is an estimate of the true problem to be solved, i.e., the expected risk minimization problem: 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mrow> 
        <mi>
          min 
        </mi> 
       </mrow> 
       <mi>
         w 
       </mi> 
      </msub> 
      <msub> 
       <mi mathvariant="double-struck">
         E 
       </mi> 
       <mrow> 
        <msub> 
         <mi>
           x 
         </mi> 
         <mi>
           i 
         </mi> 
        </msub> 
        <mo>
          ~ 
        </mo> 
        <mi>
          p 
        </mi> 
       </mrow> 
      </msub> 
      <mrow> 
       <mo>
         [ 
       </mo> 
       <mrow> 
        <msub> 
         <mi>
           f 
         </mi> 
         <mi>
           i 
         </mi> 
        </msub> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            w 
          </mi> 
          <mo>
            ; 
          </mo> 
          <msub> 
           <mi>
             x 
           </mi> 
           <mi>
             i 
           </mi> 
          </msub> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mrow> 
       <mo>
         ] 
       </mo> 
      </mrow> 
     </mrow> 
    </math>. Generally, without information on the distribution 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       p 
     </mi> 
    </math> to solve a risk minimization problem, we can solve Equation (8) alternatively.</p>
   <p>If the objective is to make a prediction based on an input, each data sample 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       x 
     </mi> 
    </math> in the dataset 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         D 
       </mi> 
       <mi>
         a 
       </mi> 
      </msub> 
     </mrow> 
    </math> has a corresponding label 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        y 
      </mi> 
      <mo>
        = 
      </mo> 
      <mi>
        C 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         x 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math>, for an unknown labeling function 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       C 
     </mi> 
    </math>. In this case, a training pair refers to the tuple 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          x 
        </mi> 
        <mo>
          , 
        </mo> 
        <mi>
          y 
        </mi> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math>, and 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       x 
     </mi> 
    </math> is considered to be a 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       d 
     </mi> 
    </math>-dimensional vector with 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        x 
      </mi> 
      <mo>
        ∈ 
      </mo> 
      <msup> 
       <mi>
         ℝ 
       </mi> 
       <mi>
         d 
       </mi> 
      </msup> 
     </mrow> 
    </math>, unless specified otherwise.</p>
   <p>ML and DL models use objective functions formulated in Equation (8). Logistic regression, which is useful for binary classification, uses the objective function as in Equation (9):</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         f 
       </mi> 
       <mi>
         i 
       </mi> 
      </msub> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         w 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mtext>
        log 
      </mtext> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mn>
          1 
        </mn> 
        <mo>
          + 
        </mo> 
        <mi>
          exp 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mo>
            − 
          </mo> 
          <msub> 
           <mi>
             y 
           </mi> 
           <mi>
             i 
           </mi> 
          </msub> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <mi>
              w 
            </mi> 
            <mo>
              , 
            </mo> 
            <msub> 
             <mi>
               x 
             </mi> 
             <mi>
               i 
             </mi> 
            </msub> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> (9)</p>
   <p>where 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         y 
       </mi> 
       <mi>
         i 
       </mi> 
      </msub> 
     </mrow> 
    </math> represents, across 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       n 
     </mi> 
    </math> observations, an averaged binary label (±1).</p>
   <p>The framing of cyberattack detection systems as optimization problems targeting accuracy, efficiency, and robustness is necessary for optimal performance. Hence, by formulating the detection task as an optimization problem, the subsequent mathematical modelling enables the development of a structured and systematic framework for model development. The following is the definition of the optimization problem.</p>
  </sec><sec id="s4">
   <title>4. The Cyberattack Detection Optimization Problem</title>
   <p>This section provides a mathematical definition of the cyberattack detection optimization problem. It begins by first defining key terms and variables that will be used in formulating the cyberattack optimization problem, before giving a formal definition of the problem.</p>
   <sec id="s4_1">
    <title>4.1. Preliminary Definitions</title>
    <p>The objective problem comprises variables, an objective function, and constraints defined over a particular domain. These elements are expressed in our cyberattack detection task as follows.</p>
    <p>These are summarized in <xref ref-type="table" rid="table1">
      Table 1
     </xref>.</p>
   </sec>
   <sec id="s4_2">
    <title>4.2. Formulation of Cyberattack Detection as an Optimization Problem</title>
    <p>To optimize DL models, we present the mathematical formulation of the cyberattack detection task in Equations (10)-(13).</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <munder> 
        <mrow> 
         <mi>
           max 
         </mi> 
        </mrow> 
        <mrow> 
         <mrow> 
          <mo>
            { 
          </mo> 
          <mrow> 
           <mi>
             P 
           </mi> 
           <mo>
             ∈ 
           </mo> 
           <mi>
             D 
           </mi> 
          </mrow> 
          <mo>
            } 
          </mo> 
         </mrow> 
        </mrow> 
       </munder> 
       <mo>
         = 
       </mo> 
       <mrow> 
        <mo>
          [ 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            R 
          </mi> 
          <mi>
            a 
          </mi> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             P 
           </mi> 
           <mo>
             ; 
           </mo> 
           <msub> 
            <mi>
              D 
            </mi> 
            <mi>
              v 
            </mi> 
           </msub> 
           <mo>
             , 
           </mo> 
           <msub> 
            <mi>
              I 
            </mi> 
            <mn>
              1 
            </mn> 
           </msub> 
           <mo>
             , 
           </mo> 
           <msub> 
            <mi>
              I 
            </mi> 
            <mn>
              2 
            </mn> 
           </msub> 
           <mo>
             , 
           </mo> 
           <mo>
             ⋯ 
           </mo> 
           <mo>
             , 
           </mo> 
           <msub> 
            <mi>
              I 
            </mi> 
            <mn>
              8 
            </mn> 
           </msub> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           − 
         </mo> 
         <mi>
           α 
         </mi> 
         <mo>
           ⋅ 
         </mo> 
         <mi>
           F 
         </mi> 
         <mi>
           P 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            P 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           − 
         </mo> 
         <mi>
           β 
         </mi> 
         <mo>
           ⋅ 
         </mo> 
         <mi>
           F 
         </mi> 
         <mi>
           N 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            P 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          ] 
        </mo> 
       </mrow> 
      </mrow> 
     </math>(10)</p>
    <table-wrap id="table1">
     <label>
      <xref ref-type="table" rid="table1">
       Table 1
      </xref></label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.146115-"></xref>Table 1. Summary of terms used.</title>
     </caption>
     <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
      <tr> 
       <td class="custom-bottom-td acenter" width="6.46%"><p style="text-align:center"></p></td> 
       <td class="custom-bottom-td acenter" width="17.24%"><p style="text-align:center">Term</p></td> 
       <td class="custom-bottom-td acenter" width="47.42%"><p style="text-align:center">Description</p></td> 
      </tr> 
      <tr> 
       <td class="custom-top-td acenter" width="6.46%"><p style="text-align:center">1.</p></td> 
       <td class="custom-top-td acenter" width="17.24%"><p style="text-align:center">C<sub>ineq</sub></p></td> 
       <td class="custom-top-td acenter" width="47.42%"><p style="text-align:center">Inequality constraint</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="6.46%"><p style="text-align:center">2.</p></td> 
       <td class="acenter" width="17.24%"><p style="text-align:center">C<sub>eq</sub></p></td> 
       <td class="acenter" width="47.42%"><p style="text-align:center">Equality constraint</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="6.46%"><p style="text-align:center">3.</p></td> 
       <td class="acenter" width="17.24%"><p style="text-align:center">D<sub>v</sub> ∈ {0, 1}</p></td> 
       <td class="acenter" width="47.42%"><p style="text-align:center">Dependent variable</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="6.46%"><p style="text-align:center">4.</p></td> 
       <td class="acenter" width="17.24%"><p style="text-align:center">I<sub>n</sub></p></td> 
       <td class="acenter" width="47.42%"><p style="text-align:center">Independent variable ( 
         <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
           <mi>
             n 
           </mi> 
           <mo>
             = 
           </mo> 
           <mn>
             1 
           </mn> 
           <mo>
             , 
           </mo> 
           <mn>
             2 
           </mn> 
           <mo>
             , 
           </mo> 
           <mn>
             3 
           </mn> 
           <mo>
             , 
           </mo> 
           <mo>
             ⋯ 
           </mo> 
           <mo>
             , 
           </mo> 
           <mn>
             8 
           </mn> 
          </mrow> 
         </math>)</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="6.46%"><p style="text-align:center">5.</p></td> 
       <td class="acenter" width="17.24%"><p style="text-align:center">D</p></td> 
       <td class="acenter" width="47.42%"><p style="text-align:center">Domain set</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="6.46%"><p style="text-align:center">6.</p></td> 
       <td class="acenter" width="17.24%"><p style="text-align:center">P</p></td> 
       <td class="acenter" width="47.42%"><p style="text-align:center">Model parameters</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="6.46%"><p style="text-align:center">7.</p></td> 
       <td class="acenter" width="17.24%"><p style="text-align:center">R<sub>a</sub></p></td> 
       <td class="acenter" width="47.42%"><p style="text-align:center">Attack detection rate</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="6.46%"><p style="text-align:center">8.</p></td> 
       <td class="acenter" width="17.24%"><p style="text-align:center">FP</p></td> 
       <td class="acenter" width="47.42%"><p style="text-align:center">False Positives (false alarms)</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="6.46%"><p style="text-align:center">9.</p></td> 
       <td class="acenter" width="17.24%"><p style="text-align:center">FN</p></td> 
       <td class="acenter" width="47.42%"><p style="text-align:center">False Negatives (undetected attacks)</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="6.46%"><p style="text-align:center">10.</p></td> 
       <td class="acenter" width="17.24%"><p style="text-align:center">α, β</p></td> 
       <td class="acenter" width="47.42%"><p style="text-align:center">Weight coefficients</p></td> 
      </tr> 
     </table>
    </table-wrap>
    <p>Subject to:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          C 
        </mi> 
        <mrow> 
         <mi>
           e 
         </mi> 
         <mi>
           q 
         </mi> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            D 
          </mi> 
          <mi>
            v 
          </mi> 
         </msub> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            I 
          </mi> 
          <mn>
            1 
          </mn> 
         </msub> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            I 
          </mi> 
          <mn>
            2 
          </mn> 
         </msub> 
         <mo>
           , 
         </mo> 
         <mo>
           ⋯ 
         </mo> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            I 
          </mi> 
          <mn>
            8 
          </mn> 
         </msub> 
         <mo>
           ; 
         </mo> 
         <mi>
           P 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mn>
         0 
       </mn> 
      </mrow> 
     </math> (11)</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          C 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mi>
           n 
         </mi> 
         <mi>
           e 
         </mi> 
         <mi>
           q 
         </mi> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            D 
          </mi> 
          <mi>
            v 
          </mi> 
         </msub> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            I 
          </mi> 
          <mn>
            1 
          </mn> 
         </msub> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            I 
          </mi> 
          <mn>
            2 
          </mn> 
         </msub> 
         <mo>
           , 
         </mo> 
         <mo>
           ⋯ 
         </mo> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            I 
          </mi> 
          <mn>
            8 
          </mn> 
         </msub> 
         <mo>
           ; 
         </mo> 
         <mi>
           P 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         ≤ 
       </mo> 
       <mn>
         0 
       </mn> 
      </mrow> 
     </math>(12)</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          D 
        </mi> 
        <mi>
          v 
        </mi> 
       </msub> 
       <mo>
         ∈ 
       </mo> 
       <mrow> 
        <mo>
          { 
        </mo> 
        <mrow> 
         <mn>
           0 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          } 
        </mo> 
       </mrow> 
      </mrow> 
     </math> (13)</p>
    <p>
     <xref ref-type="fig" rid="fig1">
      Figure 1
     </xref> is a visual showing the optimization function. The explicit formulation of the generic optimization theory for the intrusion detection problem guarantees that the framework is mathematically sound and, in addition, operationally sound.</p>
    <fig id="fig1" position="float">
     <label>Figure 1</label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.146115-"></xref>Figure 1. Formulation of the optimization problem.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1733279-rId173.jpeg?20250928101625" />
    </fig>
   </sec>
  </sec><sec id="s5">
   <title>5. Experimental Design</title>
   <p>Mathematical optimization techniques are used to find optimal values for the deep learning-based model parameters, P.</p>
   <sec id="s5_1">
    <title>5.1. Experimental Environment</title>
    <p>The experimental environment specifications for testing the proposed framework for the LSTM model were as follows: a v2-8 TPU, an NVIDIA Tesla K80 GPU with 12 GB of RAM, and an Intel(R) Xeon(R) CPU running at 2.20 GHz. Boruta is used for the feature selection task on the CICIDS-2017 dataset.</p>
    <p>The rationale for the CICIDS-2017 dataset selection is the complex attacks it contains; hence, the dataset is representative of real-world network traffic <xref ref-type="bibr" rid="scirp.146115-37">
      [37]
     </xref>. The dataset comprises 79 features with 15 class labels spanning eight files of network traffic captured over five days. This ensures a complete network infrastructure crucial for cybersecurity model training for attack detection tasks.</p>
   </sec>
   <sec id="s5_2">
    <title>5.2. Test Model</title>
    <p>In DL, neural networks such as Long Short-Term Memory (LSTM), Recurrent Neural Network (RNN), or DNN are trained for the classification task. This study employs the LSTM algorithm for training the optimized cyber-attack detection system and for the baseline experiment. An inherent characteristic of LSTM is its superior ability to memorize and comprehend long-term sequences, which is particularly crucial given network data’s sequential and time-based nature. Conversely, LSTM is a specialized architectural variation of RNN <xref ref-type="bibr" rid="scirp.146115-38">
      [38]
     </xref> developed to address challenges such as vanishing and exploding gradients. It exhibits exceptional sensitivity in detecting recurring patterns over brief and extended periods, making it stand out in detecting intricate and time-consuming multi-step cyber threats.</p>
   </sec>
   <sec id="s5_3">
    <title>5.3. Model Setup</title>
    <p>The key stages where optimal measures are essential are feature selection, hyper-parameter tuning, model training, and validation. Optimization helps address various challenges in cyberattack detection where data is continuously generated in real-time environments. These include long training times, poor generalization speeds, model size complexities, and achieving continuous model learning over time. By optimizing the training algorithm, DL models can learn more effectively from the data and better capture the underlying patterns of attacks.</p>
    <p>
     <xref ref-type="fig" rid="fig2">
      Figure 2
     </xref> provides a summary of the optimization techniques applied in the study.</p>
    <fig id="fig2" position="float">
     <label>Figure 2</label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.146115-"></xref>Figure 2. Framework for application of the optimization techniques.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1733279-rId174.jpeg?20250928101626" />
    </fig>
    <p>The model’s performance will be enhanced by selecting pertinent features and excluding irrelevant or superfluous ones <xref ref-type="bibr" rid="scirp.146115-13">
      [13]
     </xref>. Optimization iteratively evaluates different feature subsets based on predefined criteria until an optimal solution is found, such as with the Boruta algorithm. Boruta reduces the features to 17 from 79 in the complete feature set, offering dimensionality reduction.</p>
    <p>The model does not learn hyperparameters during training; attributes are set beforehand and influence learning <xref ref-type="bibr" rid="scirp.146115-20">
      [20]
     </xref>. Grid and random search techniques thoroughly explore the hyper-parameter space and identify the configurations with the best outcomes <xref ref-type="bibr" rid="scirp.146115-28">
      [28]
     </xref> <xref ref-type="bibr" rid="scirp.146115-32">
      [32]
     </xref>. Grid search is a brute-force method that tests various combinations of hyperparameters, while random search uses random combinations from predefined hyperparameter ranges <xref ref-type="bibr" rid="scirp.146115-18">
      [18]
     </xref> <xref ref-type="bibr" rid="scirp.146115-20">
      [20]
     </xref> <xref ref-type="bibr" rid="scirp.146115-28">
      [28]
     </xref>.</p>
    <p>The model can achieve higher accuracy and generalization ability following hyper-parameter tuning, where the best values for different model parameters, including batch size, number of neural network layers, learning rate, and number of units per layer, are identified. We classify the hyperparameters into compilation, architectural, and training categories. The compilation category defines how the model is compiled, the architectural category defines the structure of the DL-model, and the training category affects the model’s training process, as summarized in <xref ref-type="table" rid="table2">
      Table 2
     </xref>.</p>
    <table-wrap id="table2">
     <label>
      <xref ref-type="table" rid="table2">
       Table 2
      </xref></label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.146115-"></xref>Table 2. Hyperparameter configurations.</title>
     </caption>
     <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
      <tr> 
       <td class="custom-bottom-td acenter" width="9.46%"><p style="text-align:center">No</p></td> 
       <td class="custom-bottom-td acenter" width="35.03%"><p style="text-align:center">Hyperparameter</p></td> 
       <td class="custom-bottom-td acenter" width="35.96%"><p style="text-align:center">Value</p></td> 
       <td class="custom-bottom-td acenter" width="22.34%"><p style="text-align:center">Category</p></td> 
      </tr> 
      <tr> 
       <td class="custom-top-td acenter" width="9.46%"><p style="text-align:center">1</p></td> 
       <td class="custom-top-td acenter" width="35.03%"><p style="text-align:center">Batch size</p></td> 
       <td class="custom-top-td acenter" width="35.96%"><p style="text-align:center">64</p></td> 
       <td class="custom-top-td acenter" width="22.34%"><p style="text-align:center">Training</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.46%"><p style="text-align:center">2</p></td> 
       <td class="acenter" width="35.03%"><p style="text-align:center">Learning rate</p></td> 
       <td class="acenter" width="35.96%"><p style="text-align:center">0.001</p></td> 
       <td class="acenter" width="22.34%"><p style="text-align:center">Training</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.46%"><p style="text-align:center">3</p></td> 
       <td class="acenter" width="35.03%"><p style="text-align:center">Epochs</p></td> 
       <td class="acenter" width="35.96%"><p style="text-align:center">250</p></td> 
       <td class="acenter" width="22.34%"><p style="text-align:center">Training</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.46%"><p style="text-align:center">4</p></td> 
       <td class="acenter" width="35.03%"><p style="text-align:center">L2 penalty factor</p></td> 
       <td class="acenter" width="35.96%"><p style="text-align:center">0.01</p></td> 
       <td class="acenter" width="22.34%"><p style="text-align:center">Training</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.46%"><p style="text-align:center">5</p></td> 
       <td class="acenter" width="35.03%"><p style="text-align:center">Early stopping patience</p></td> 
       <td class="acenter" width="35.96%"><p style="text-align:center">10</p></td> 
       <td class="acenter" width="22.34%"><p style="text-align:center">Training</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.46%"><p style="text-align:center">6</p></td> 
       <td class="acenter" width="35.03%"><p style="text-align:center">Optimizer</p></td> 
       <td class="acenter" width="35.96%"><p style="text-align:center">Adam</p></td> 
       <td class="acenter" width="22.34%"><p style="text-align:center">Compilation</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.46%"><p style="text-align:center">7</p></td> 
       <td class="acenter" width="35.03%"><p style="text-align:center">Loss function</p></td> 
       <td class="acenter" width="35.96%"><p style="text-align:center">Categorical cross entropy</p></td> 
       <td class="acenter" width="22.34%"><p style="text-align:center">Compilation</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.46%"><p style="text-align:center">8</p></td> 
       <td class="acenter" width="35.03%"><p style="text-align:center">Metric</p></td> 
       <td class="acenter" width="35.96%"><p style="text-align:center">Accuracy</p></td> 
       <td class="acenter" width="22.34%"><p style="text-align:center">Compilation</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.46%"><p style="text-align:center">9</p></td> 
       <td class="acenter" width="35.03%"><p style="text-align:center">Output layer activation</p></td> 
       <td class="acenter" width="35.96%"><p style="text-align:center">Softmax</p></td> 
       <td class="acenter" width="22.34%"><p style="text-align:center">Architectural</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.46%"><p style="text-align:center">10</p></td> 
       <td class="acenter" width="35.03%"><p style="text-align:center">LSTM layers</p></td> 
       <td class="acenter" width="35.96%"><p style="text-align:center">2 + 1 dense layers for output</p></td> 
       <td class="acenter" width="22.34%"><p style="text-align:center">Architectural</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.46%"><p style="text-align:center">11</p></td> 
       <td class="acenter" width="35.03%"><p style="text-align:center">Units per layer</p></td> 
       <td class="acenter" width="35.96%"><p style="text-align:center">50</p></td> 
       <td class="acenter" width="22.34%"><p style="text-align:center">Architectural</p></td> 
      </tr> 
     </table>
    </table-wrap>
    <p>During the training phase, optimization is leveraged to improve the training speed and stability of the model. Gradient-based optimization algorithms, such as stochastic gradient descent (SGD), Adaptive Moment Estimation (Adam), or Root Mean Square Propagation (RMSprop), are used to update the model parameters iteratively <xref ref-type="bibr" rid="scirp.146115-32">
      [32]
     </xref>. Learning rate scheduling and momentum adaptation also fine-tune the optimization process and prevent vanishing or exploding gradients.</p>
    <p>Activation functions control how the output of each layer is transformed before passing it to the next layer in neural networks <xref ref-type="bibr" rid="scirp.146115-32">
      [32]
     </xref> <xref ref-type="bibr" rid="scirp.146115-39">
      [39]
     </xref>. These include the Rectified Linear Unit (ReLU), Softmax, and the hyperbolic tangent function (Tanh). Softmax is used in the output layer for multi-class classification tasks to convert raw output scores from the model into probabilities, which sum to 1 <xref ref-type="bibr" rid="scirp.146115-32">
      [32]
     </xref>. This makes it suitable for interpreting the model’s predictions and enables the model to express its confidence in each class. Tanh maps outputs between -1 and 1 to ensure zero-centered outputs and adds non-linearity for efficient model training <xref ref-type="bibr" rid="scirp.146115-32">
      [32]
     </xref> <xref ref-type="bibr" rid="scirp.146115-39">
      [39]
     </xref>. ReLU is simple, fast, and can minimize the vanishing gradient problems in DL models <xref ref-type="bibr" rid="scirp.146115-39">
      [39]
     </xref>.</p>
    <p>This study employs the categorical cross-entropy loss function, ensuring the model appropriately differentiates between normal and attack data over time. The loss function measures how well the predictions from the model align with the actual data values <xref ref-type="bibr" rid="scirp.146115-6">
      [6]
     </xref>. It is a guiding metric during training, allowing the model to update its parameters or weights to reduce differences between predicted and actual values. It is appropriate for classification problems like intrusion detection systems <xref ref-type="bibr" rid="scirp.146115-6">
      [6]
     </xref>. It affects the learning process and the model’s performance through error reduction.</p>
    <p>The Adam optimizer blends the advantages of the adaptive learning rate and momentum techniques during training to ensure correct model generalization <xref ref-type="bibr" rid="scirp.146115-32">
      [32]
     </xref>. It uses estimates of the first (mean) and second gradient (variance) moments, ensuring robustness in training DL algorithms. Adam ensures that the neural network learns efficiently <xref ref-type="bibr" rid="scirp.146115-38">
      [38]
     </xref>.</p>
    <p>Another optimization task is class imbalance handling. Class imbalance is common with cybersecurity datasets, as most datasets have benign data and a smaller portion consists of malicious data <xref ref-type="bibr" rid="scirp.146115-33">
      [33]
     </xref>. The class-weighted loss function is applied to counter class imbalance problems. It ensures that optimizing the loss function for imbalanced data is addressed using class weights <xref ref-type="bibr" rid="scirp.146115-33">
      [33]
     </xref>. Assigning larger weight values to the marginal class (attacks) is crucial to ensure attack misclassifications are heavily penalized.</p>
    <p>Regularization techniques are applied to avoid model overfitting and generalization problems, specifically early stopping and L2 regularization. In the early stopping technique, model training is stopped as soon as the performance weakens. This is significant as it prevents overfitting the model to the training data. In L2 regularization, large weights are penalized by attaching a penalty factor to the loss function. Consequently, smaller weights are used, which avoids model overfitting. Optimizers, activation functions, and regularization techniques collectively affect the performance of a model <xref ref-type="bibr" rid="scirp.146115-40">
      [40]
     </xref>. <xref ref-type="table" rid="table3">
      Table 3
     </xref> shows a summary of the concepts applied in the optimization of the DL-based model development for cyberattack detection in web-based systems.</p>
    <table-wrap id="table3">
     <label>
      <xref ref-type="table" rid="table3">
       Table 3
      </xref></label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.146115-"></xref>Table 3. Optimization concepts employed.</title>
     </caption>
     <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
      <tr> 
       <td class="custom-bottom-td acenter" width="7.77%"><p style="text-align:center"></p></td> 
       <td class="custom-bottom-td acenter" width="39.35%"><p style="text-align:center">Concept</p></td> 
       <td class="custom-bottom-td acenter" width="46.86%"><p style="text-align:center">Technique</p></td> 
      </tr> 
      <tr> 
       <td class="custom-top-td acenter" width="7.77%"><p style="text-align:center">1</p></td> 
       <td class="custom-top-td acenter" width="39.35%"><p style="text-align:center">Hyper-parameter exploration</p></td> 
       <td class="custom-top-td acenter" width="46.86%"><p style="text-align:center">Grid search, random search</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="7.77%"><p style="text-align:center">2</p></td> 
       <td class="acenter" width="39.35%"><p style="text-align:center">Activation functions</p></td> 
       <td class="acenter" width="46.86%"><p style="text-align:center">ReLU, Softmax, Tanh</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="7.77%"><p style="text-align:center">3</p></td> 
       <td class="acenter" width="39.35%"><p style="text-align:center">Regularization</p></td> 
       <td class="acenter" width="46.86%"><p style="text-align:center">L2, early stopping</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="7.77%"><p style="text-align:center">4</p></td> 
       <td class="acenter" width="39.35%"><p style="text-align:center">Gradient-based optimization</p></td> 
       <td class="acenter" width="46.86%"><p style="text-align:center">Adam</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="7.77%"><p style="text-align:center">5</p></td> 
       <td class="acenter" width="39.35%"><p style="text-align:center">Loss functions</p></td> 
       <td class="acenter" width="46.86%"><p style="text-align:center">Categorical cross-entropy, Weighted</p></td> 
      </tr> 
     </table>
    </table-wrap>
    <p>The data validation set is used to tune the hyperparameters, hence avoiding generalization and overfitting issues. Validation ensures the model reliably functions on training and validation data <xref ref-type="bibr" rid="scirp.146115-41">
      [41]
     </xref> <xref ref-type="bibr" rid="scirp.146115-42">
      [42]
     </xref>. Training loss is calculated on the training data after each epoch, while the validation loss is calculated on the validation data after each epoch <xref ref-type="bibr" rid="scirp.146115-41">
      [41]
     </xref>. If the validation loss is higher than the training loss, it may be overfitting to the training data, signifying that it memorizes patterns rather than learning generalization.</p>
    <p>Cross-validation methods are also extensively used in intrusion detection system research as they lower computing time while maintaining the performance of the algorithms <xref ref-type="bibr" rid="scirp.146115-41">
      [41]
     </xref> <xref ref-type="bibr" rid="scirp.146115-42">
      [42]
     </xref>. Generally, the validation loss and accuracy results (discussed in Section 6) reiterate the optimization process’s success (or lack thereof) and subsequent model performance. <xref ref-type="table" rid="table4">
      Table 4
     </xref> provides a summary of techniques used and their relevance to the optimization process of the models.</p>
    <table-wrap id="table4">
     <label>
      <xref ref-type="table" rid="table4">
       Table 4
      </xref></label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.146115-"></xref>Table 4. Summary of techniques and their relevance to optimization.</title>
     </caption>
     <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
      <tr> 
       <td class="custom-bottom-td acenter" width="8.62%"><p style="text-align:center"></p></td> 
       <td class="custom-bottom-td acenter" width="49.57%"><p style="text-align:center">Technique</p></td> 
       <td class="custom-bottom-td acenter" width="70.29%"><p style="text-align:center">Relevance</p></td> 
      </tr> 
      <tr> 
       <td class="custom-top-td acenter" width="8.62%"><p style="text-align:center">1.</p></td> 
       <td class="custom-top-td acenter" width="49.57%"><p style="text-align:center">Early stopping, L2 regularization</p></td> 
       <td class="custom-top-td acenter" width="70.29%"><p style="text-align:center">Enhance model generalization.</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="8.62%"><p style="text-align:center">2.</p></td> 
       <td class="acenter" width="49.57%"><p style="text-align:center">Boruta</p></td> 
       <td class="acenter" width="70.29%"><p style="text-align:center">Feature selection.</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="8.62%"><p style="text-align:center">3.</p></td> 
       <td class="acenter" width="49.57%"><p style="text-align:center">Grid search, random search</p></td> 
       <td class="acenter" width="70.29%"><p style="text-align:center">Hyper-parameter optimization.</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="8.62%"><p style="text-align:center">4.</p></td> 
       <td class="acenter" width="49.57%"><p style="text-align:center">Hyper-parameter tuning</p></td> 
       <td class="acenter" width="70.29%"><p style="text-align:center">Identify the best values for different model parameters.</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="8.62%"><p style="text-align:center">5.</p></td> 
       <td class="acenter" width="49.57%"><p style="text-align:center">Adam optimizer</p></td> 
       <td class="acenter" width="70.29%"><p style="text-align:center">Adjust the learning rate for efficient model learning.</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="8.62%"><p style="text-align:center">6.</p></td> 
       <td class="acenter" width="49.57%"><p style="text-align:center">ReLU activation function</p></td> 
       <td class="acenter" width="70.29%"><p style="text-align:center">Handles vanishing gradient problems.</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="8.62%"><p style="text-align:center">7.</p></td> 
       <td class="acenter" width="49.57%"><p style="text-align:center">Tanh activation function</p></td> 
       <td class="acenter" width="70.29%"><p style="text-align:center">Adds non-linearity, which is essential for learning patterns.</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="8.62%"><p style="text-align:center">8.</p></td> 
       <td class="acenter" width="49.57%"><p style="text-align:center">Softmax activation function</p></td> 
       <td class="acenter" width="70.29%"><p style="text-align:center">Generates probability distributions for efficient training.</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="8.62%"><p style="text-align:center">9.</p></td> 
       <td class="acenter" width="49.57%"><p style="text-align:center">Weighted loss function</p></td> 
       <td class="acenter" width="70.29%"><p style="text-align:center">Handling class imbalances.</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="8.62%"><p style="text-align:center">10.</p></td> 
       <td class="acenter" width="49.57%"><p style="text-align:center">Categorical cross-entropy loss function</p></td> 
       <td class="acenter" width="70.29%"><p style="text-align:center">Error reduction.</p></td> 
      </tr> 
     </table>
    </table-wrap>
   </sec>
   <sec id="s5_4">
    <title>5.4. Baseline Experiment</title>
    <p>A baseline experiment without integrated optimization (WIO) was carried out using the same LSTM architecture without Boruta feature selection and class imbalance handling, and with manual hyper-parameter tuning, to measure the advantages of the suggested integrated optimization pipeline. The baseline employed default Adam optimizer settings, all 78 features, and 1 for the label, from the CICIDS-2017 dataset, and no regularization methods other than a dropout rate of 0.2.</p>
   </sec>
  </sec><sec id="s6">
   <title>6. Results and Discussion</title>
   <p>The results of the experimental work follow.</p>
   <sec id="s6_1">
    <title>6.1. Results for the Baseline LSTM Experiment WIO</title>
    <p>The accuracy and loss values over 390 training epochs indicate a gradual increase in the training accuracy to 87.4%, and the validation accuracy peaks at 85%. The training loss decreases by 0.4 from 1.7, while the validation loss reduces to 0.5 from 1.8. The recurring increase in validation loss with reducing training loss over the epochs indicates overfitting. Without optimization, the model will eventually start memorizing the training data at a high rate, causing it to fail in generalization. These results depict poor model learning, increased overfitting instances, a lack of convergence control, and unstable training. <xref ref-type="fig" rid="fig3">
      Figure 3
     </xref> shows the accuracy and loss values over the training cycle.</p>
    <fig id="fig3" position="float">
     <label>Figure 3</label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.146115-"></xref>Figure 3. LSTM baseline WIO accuracy and loss over epochs.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1733279-rId175.jpeg?20250928101628" />
    </fig>
    <table-wrap id="table5">
     <label>
      <xref ref-type="table" rid="table5">
       Table 5
      </xref></label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.146115-"></xref>Table 5. LSTM baseline WIO performance metrics.</title>
     </caption>
     <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
      <tr> 
       <td class="custom-bottom-td acenter" width="28.02%"><p style="text-align:center">Metric</p></td> 
       <td class="custom-bottom-td acenter" width="18.06%"><p style="text-align:center">Percentage</p></td> 
       <td class="custom-bottom-td acenter" width="48.75%"><p style="text-align:center">Relevance</p></td> 
      </tr> 
      <tr> 
       <td class="custom-top-td acenter" width="28.02%"><p style="text-align:center">FP</p></td> 
       <td class="custom-top-td acenter" width="18.06%"><p style="text-align:center">3.4</p></td> 
       <td class="custom-top-td acenter" width="48.75%"><p style="text-align:center">High benign misclassifications</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="28.02%"><p style="text-align:center">FN</p></td> 
       <td class="acenter" width="18.06%"><p style="text-align:center">8.9</p></td> 
       <td class="acenter" width="48.75%"><p style="text-align:center">High rates of missed attacks</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="28.02%"><p style="text-align:center">Accuracy</p></td> 
       <td class="acenter" width="18.06%"><p style="text-align:center">87.8</p></td> 
       <td class="acenter" width="48.75%"><p style="text-align:center">Overall correctness for all predictions</p></td> 
      </tr> 
     </table>
    </table-wrap>
    <p>As presented in <xref ref-type="table" rid="table5">
      Table 5
     </xref>, the model achieves accuracy, FP, and FN scores of 87.8%, 3.4%, and 8.9%, respectively. These FP and FN values demonstrate higher cases of misclassifications and missed attacks, which are not ideal for cybersecurity applications.</p>
   </sec>
   <sec id="s6_2">
    <title>6.2. Results for LSTM with Optimization</title>
    <p>The accuracy and loss values are tracked over 250 training epochs. The training accuracy gradually improves to 94.8%, while the validation accuracy peaks at 93%. The training loss decreases from 1.2 to 0.2, while the validation loss starts at 1.3 and reduces to 0.3. This demonstrates effective model learning, as depicted in <xref ref-type="fig" rid="fig4">
      Figure 4
     </xref>.</p>
    <fig id="fig4" position="float">
     <label>Figure 4</label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.146115-"></xref>Figure 4. LSTM training and validation accuracy and loss.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1733279-rId176.jpeg?20250928101629" />
    </fig>
    <p>The results of the experiment, presented in <xref ref-type="table" rid="table6">
      Table 6
     </xref>, show an accuracy score of 94.7%, an FP rate of 1.1%, and an FN rate of 5.3%. These values are optimal and crucial in cybersecurity to ensure reliable attack detection while minimizing false alarms and missed detections.</p>
    <table-wrap id="table6">
     <label>
      <xref ref-type="table" rid="table6">
       Table 6
      </xref></label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.146115-"></xref>Table 6. Performance metrics for the optimized LSTM model.</title>
     </caption>
     <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
      <tr> 
       <td class="custom-bottom-td acenter" width="28.02%"><p style="text-align:center">Metric</p></td> 
       <td class="custom-bottom-td acenter" width="18.06%"><p style="text-align:center">Percentage</p></td> 
       <td class="custom-bottom-td acenter" width="48.75%"><p style="text-align:center">Relevance</p></td> 
      </tr> 
      <tr> 
       <td class="custom-top-td acenter" width="28.02%"><p style="text-align:center">FP</p></td> 
       <td class="custom-top-td acenter" width="18.06%"><p style="text-align:center">1.1</p></td> 
       <td class="custom-top-td acenter" width="48.75%"><p style="text-align:center">Low benign misclassifications</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="28.02%"><p style="text-align:center">FN</p></td> 
       <td class="acenter" width="18.06%"><p style="text-align:center">5.3</p></td> 
       <td class="acenter" width="48.75%"><p style="text-align:center">Low missed attacks</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="28.02%"><p style="text-align:center">Accuracy</p></td> 
       <td class="acenter" width="18.06%"><p style="text-align:center">94.7</p></td> 
       <td class="acenter" width="48.75%"><p style="text-align:center">Overall correctness for all predictions</p></td> 
      </tr> 
     </table>
    </table-wrap>
   </sec>
   <sec id="s6_3">
    <title>6.3. Performance Comparison of the Baseline WIO and the Optimized Framework</title>
    <p>The optimized LSTM framework outperforms the Baseline LSTM without integrated optimization (WIO). The FP rate of 1.1% indicates that only 1.1% of the benign instances are incorrectly flagged as malicious. This low FP rate demonstrates the high specificity of the optimized LSTM model. A small FP rate can still be disruptive in high-traffic networks; therefore, continuous tuning is necessary. A high FP rate, such as 3.4% in the LSTM WIO model, results in excessive false alerts that can lead to system analyst fatigue, wasted resources, ignored alerts, disruption of operations, and diminished trust in the detection models.</p>
    <p>Conversely, the FN rate indicates malicious instances are wrongly classified as benign. FN is critical as it demonstrates the ability to spot malicious traffic. The achieved FN rate in the optimized LSTM model signifies that only 5.3% of the actual attacks are missed. This relatively low rate of missed attacks demonstrates robust performance in identifying malicious traffic. A higher FN value, as in the LSTM WIO model at 8.9%, can potentially lead to data breaches. A severe missed attack, even with a low FN rate, can be detrimental in cybersecurity. A low FN rate ensures resiliency against different malicious vectors.</p>
    <p>An accuracy of 94.7% implies that the optimized LSTM model correctly predicted 94.7% of all instances, whether normal or malicious, showing strong overall performance in identifying patterns in varied network scenarios compared to 87.8% for the LSTM WIO model.</p>
    <p>Overall, there is an improvement in the accuracy, FP, and FN scores by 6.9%, 67.6%, and 40.4%, respectively. The comparison of the results is shown in <xref ref-type="table" rid="table7">
      Table 7
     </xref>.</p>
    <table-wrap id="table7">
     <label>
      <xref ref-type="table" rid="table7">
       Table 7
      </xref></label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.146115-"></xref>Table 7. Results comparison.</title>
     </caption>
     <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
      <tr> 
       <td class="custom-bottom-td acenter" width="35.35%"><p style="text-align:center">Metric</p></td> 
       <td class="custom-bottom-td acenter" width="26.73%"><p style="text-align:center">Baseline LSTM (WIO)</p></td> 
       <td class="custom-bottom-td acenter" width="21.54%"><p style="text-align:center">Optimized LSTM</p></td> 
       <td class="custom-bottom-td acenter" width="17.24%"><p style="text-align:center">Improvement</p></td> 
      </tr> 
      <tr> 
       <td class="custom-top-td acenter" width="35.35%"><p style="text-align:center">Accuracy (%)</p></td> 
       <td class="custom-top-td acenter" width="26.73%"><p style="text-align:center">87.8</p></td> 
       <td class="custom-top-td acenter" width="21.54%"><p style="text-align:center">94.7</p></td> 
       <td class="custom-top-td acenter" width="17.24%"><p style="text-align:center">+6.9%</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="35.35%"><p style="text-align:center">FP Rate (%)</p></td> 
       <td class="acenter" width="26.73%"><p style="text-align:center">3.4</p></td> 
       <td class="acenter" width="21.54%"><p style="text-align:center">1.1</p></td> 
       <td class="acenter" width="17.24%"><p style="text-align:center">+67.6%</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="35.35%"><p style="text-align:center">FN Rate (%)</p></td> 
       <td class="acenter" width="26.73%"><p style="text-align:center">8.9</p></td> 
       <td class="acenter" width="21.54%"><p style="text-align:center">5.3</p></td> 
       <td class="acenter" width="17.24%"><p style="text-align:center">+40.4%</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="35.35%"><p style="text-align:center">Training Epochs to Converge</p></td> 
       <td class="acenter" width="26.73%"><p style="text-align:center">390</p></td> 
       <td class="acenter" width="21.54%"><p style="text-align:center">250</p></td> 
       <td class="acenter" width="17.24%"><p style="text-align:center">+35.9%</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="35.35%"><p style="text-align:center">Avg. Training Time/Epoch(s)</p></td> 
       <td class="acenter" width="26.73%"><p style="text-align:center">42</p></td> 
       <td class="acenter" width="21.54%"><p style="text-align:center">26</p></td> 
       <td class="acenter" width="17.24%"><p style="text-align:center">+38.1%</p></td> 
      </tr> 
     </table>
    </table-wrap>
   </sec>
   <sec id="s6_4">
    <title>6.4. Scalability and Computational Performance</title>
    <p>Beyond detection accuracy, a cyberattack detection system’s practicality rests on its capacity to handle high traffic volumes with low latency.</p>
    <p>Component contributions to scalability include:</p>
    <p>1) Boruta feature selection, which reduces input dimensionality and speeds up preprocessing and training, is one component that contributes to scalability.</p>
    <p>2) The Adam optimizer with momentum adaptation converges quickly without sacrificing accuracy.</p>
    <p>3) Early stopping, after optimal generalization is attained, avoids wasting training cycles.</p>
    <p>4) To address class imbalance, weighted loss functions prevent the need for repeated retraining.</p>
    <p>These improvements allow for highly accurate, near-real-time threat detection in production networks.</p>
   </sec>
  </sec><sec id="s7">
   <title>7. Conclusion</title>
   <p>This paper presents a comprehensive optimization-driven framework for cyberattack detection, offering extensible theoretical and practical insights for cybersecurity modelling and a foundation for future research and actual deployment in security environments. The framework transforms standard optimization components into a domain-specific, DL-based system, validated across multiple threat scenarios in the CIC-IDS 2017 dataset, offering an intelligent solution for cyber defense. Deploying the optimization framework across architectural design, training techniques, and hyper-parameter tuning highlights its efficiency and robustness in model development. Extensions of this framework to other detection systems and the application of ensemble and reinforcement learning for dynamic defense strategies lay the groundwork for future research.</p>
  </sec><sec id="s8">
   <title>Author Contributions</title>
   <p>Conceptualization, G.A.O. and N.M.; methodology, G.A.O. and C.Y.; software, G.A.O. and C.Y.; validation, G.A.O., N.M. and C.Y.; formal analysis, G.A.O. and N.M.; investigation, G.A.O. and N.M.; resources, G.A.O.; data curation, G.A.O. and C.Y.; writing—original draft preparation, G.A.O.; writing—review and editing, G.A.O., N.M. and C.Y.; visualization, G.A.O. and C.Y.; supervision, N.M. and C.Y.; project administration, N.M. and C.Y. All authors have read and agreed to the published version of the manuscript.</p>
  </sec><sec id="s9">
   <title>Data Availability Statement</title>
   <p>The CIC-IDS 2017 dataset used in the research is available at: <xref ref-type="bibr" rid="scirp.146115-https://www.kaggle.com/datasets/amanverma1999/a-comprehensive-dataset-for-ddos-attack">
     https://www.kaggle.com/datasets/amanverma1999/a-comprehensive-dataset-for-ddos-attack
    </xref>.</p>
  </sec><sec id="s10">
   <title>Acknowledgements</title>
   <p>We thank the members of the School of Informatics and Innovative Systems at Jaramogi Oginga Odinga University of Science and Technology for their valuable insights during the research.</p>
  </sec><sec id="s11">
   <title>Abbreviations</title>
   <p>The following abbreviations are used in this manuscript:</p>
   <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">ML</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Machine Learning</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">DL</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Deep Learning</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">SA</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Simulated Annealing</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">PSO</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Particle Swarm Optimization</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">GT</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Game Theory</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">EA</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Evolutionary Algorithm</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">GA</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Genetic Algorithms</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">DNN</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Deep Neural Network</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">IoMT</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Internet of Medical Things</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">PSD</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Power Spectral Density</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">CICIDS</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Canadian Institute for Cybersecurity Intrusion Detection System 2017</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">TCP</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Transmission Control Protocol</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">IAT</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Inter-Arrival Time</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">FP</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">False Positive</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">FN</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">False Negative</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">DoS</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Denial of Service</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">DDoS</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Distributed Denial of Service</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">SQL</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Structured Query Language</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">CSRF</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Cross-Request Site Forgery</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">XSS</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Cross-Site Scripting</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">LSTM</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Long Short-Term Memory</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">RNN</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Recurrent Neural Network</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">SGD</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Stochastic Gradient Descent</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">Adam</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Adaptive Moment Estimation</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">RMSProp</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Root Mean Square Propagation</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">ReLU</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Rectified Linear Unit</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">Tanh</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Hyperbolic Tangent</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">TPU</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Tensor Processing Unit</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">GPU</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Graphics Processing Unit</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">CPU</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Central Processing Unit</p></td> 
    </tr> 
    <tr> 
     <td class="aleft" width="19.40%"><p style="text-align:left">WIO</p></td> 
     <td class="aleft" width="80.60%"><p style="text-align:left">Without Integrated Optimization</p></td> 
    </tr> 
   </table>
  </sec>
 </body><back>
  <ref-list>
   <title>References</title>
   <ref id="scirp.146115-ref1">
    <label>1</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Kutateladze, S.S. (2011) Mathematics and Economics of Leonid Kantorovich. 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref2">
    <label>2</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Mohammadi, A. and Sheikholeslam, F. (2023) Intelligent Optimization: Literature Review and State-of-the-Art Algorithms (1965-2022). Engineering Applications of Artificial Intelligence, 126, Article 106959. &gt;https://doi.org/10.1016/j.engappai.2023.106959 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref3">
    <label>3</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Zhang, J., Pan, L., Han, Q., Chen, C., Wen, S. and Xiang, Y. (2022) Deep Learning Based Attack Detection for Cyber-Physical System Cybersecurity: A Survey. IEEE/CAA Journal of Automatica Sinica, 9, 377-391. &gt;https://doi.org/10.1109/jas.2021.1004261 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref4">
    <label>4</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Zieni, R., Massari, L. and Calzarossa, M.C. (2023) Phishing or Not Phishing? A Survey on the Detection of Phishing Websites. IEEE Access, 11, 18499-18519. &gt;https://doi.org/10.1109/access.2023.3247135 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref5">
    <label>5</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Do, N.Q., Selamat, A., Krejcar, O., Herrera-Viedma, E. and Fujita, H. (2022) Deep Learning for Phishing Detection: Taxonomy, Current Challenges and Future Directions. IEEE Access, 10, 36429-36463. &gt;https://doi.org/10.1109/access.2022.3151903
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref6">
    <label>6</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Mao, A.Q., Mohri, M. and Zhong, Y.T. (2023) Cross-Entropy Loss Functions: Theoretical Analysis and Applications. Proceedings of the 40th International Conference on Machine Learning (ICML 2023), PMLR, Honolulu 23803-23828. &gt;https://doi.org/10.48550/arXiv.2304.07288 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref7">
    <label>7</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Adby, P. (2013) Introduction to Optimization Methods. Springer Science&amp;Business Media. 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref8">
    <label>8</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Lan, G. (2020) Convex Optimization Theory. In: First-Order and Stochastic Optimization Methods for Machine Learning, Springer, 21-51. 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref9">
    <label>9</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Erten, H.I., Deveci, H.A. and Artem, H.S. (2020) Stochastic Optimization Methods. In: Designing Engineering Structures Using Stochastic Optimization Methods, CRC Press, 10-23. &gt;https://doi.org/10.1201/9780429289576-2
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref10">
    <label>10</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Guilmeau, T., Chouzenoux, E. and Elvira, V. (2021) Simulated Annealing: A Review and a New Scheme. 2021 IEEE Statistical Signal Processing Workshop (SSP), Rio de Janeiro, 11-14 July 2021, 101-105. &gt;https://doi.org/10.1109/ssp49050.2021.9513782 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref11">
    <label>11</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Gad, A.G. (2022) Particle Swarm Optimization Algorithm and Its Applications: A Systematic Review. Archives of Computational Methods in Engineering, 29, 2531-2561. &gt;https://doi.org/10.1007/s11831-021-09694-4 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref12">
    <label>12</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Shami, T.M., El-Saleh, A.A., Alswaitti, M., Al-Tashi, Q., Summakieh, M.A. and Mirjalili, S. (2022) Particle Swarm Optimization: A Comprehensive Survey. IEEE Access, 10, 10031-10061. &gt;https://doi.org/10.1109/access.2022.3142859 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref13">
    <label>13</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Sohrabi, M.K. and Azgomi, H. (2020) A Survey on the Combined Use of Optimization Methods and Game Theory. Archives of Computational Methods in Engineering, 27, 59-80. &gt;https://doi.org/10.1007/s11831-018-9300-5 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref14">
    <label>14</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Rajeswaran, A., Mordatch, I. and Kumar, V. (2020) A Game Theoretic Framework for Model Based Reinforcement Learning. 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref15">
    <label>15</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Slowik, A. and Kwasnicka, H. (2020) Evolutionary Algorithms and Their Applications to Engineering Problems. Neural Computing and Applications, 32, 12363-12379. &gt;https://doi.org/10.1007/s00521-020-04832-8 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref16">
    <label>16</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Deng, W., Shang, S., Cai, X., Zhao, H., Song, Y. and Xu, J. (2021) An Improved Differential Evolution Algorithm and Its Application in Optimization Problem. Soft Computing, 25, 5277-5298. &gt;https://doi.org/10.1007/s00500-020-05527-x 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref17">
    <label>17</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Sun, R. (2020) Optimization for Deep Learning: An Overview. Journal of the Operations Research Society of China, 8, 249-294. &gt;https://doi.org/10.1007/s40305-020-00309-6 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref18">
    <label>18</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Mendler-Dünner, C., Perdomo, J., Zrnic, T. and Hardt, M. (2020) Stochastic Optimization for Performative Prediction. In: Advances in Neural Information Processing Systems, Curran Associates, 4929-4939. 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref19">
    <label>19</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Drusvyatskiy, D. and Xiao, L. (2023) Stochastic Optimization with Decision-Dependent Distributions. Mathematics of Operations Research, 48, 954-998. &gt;https://doi.org/10.1287/moor.2022.1287 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref20">
    <label>20</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Curtis, F.E. and Scheinberg, K. (2020) Adaptive Stochastic Optimization: A Framework for Analyzing Stochastic Optimization Algorithms. IEEE Signal Processing Magazine, 37, 32-42. &gt;https://doi.org/10.1109/msp.2020.3003539 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref21">
    <label>21</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Li, B. and Huang, T. (2022) Control Variable Parameterization and Optimization Method for Stochastic Linear Quadratic Models. Chaos, Solitons&amp;Fractals, 154, Article 111638. &gt;https://doi.org/10.1016/j.chaos.2021.111638 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref22">
    <label>22</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Piotrowski, R., Wonia, M. and Wonia, A. (2023) Stochastic Optimisation Algorithm for Optimisation of Controller Parameters for Control of Dissolved Oxygen in Wastewater Treatment Plant. Journal of Water Process Engineering, 51, Article 103357. &gt;https://doi.org/10.1016/j.jwpe.2022.103357 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref23">
    <label>23</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Li, C. and Grossmann, I.E. (2021) A Review of Stochastic Programming Methods for Optimization of Process Systems under Uncertainty. Frontiers in Chemical Engineering, 2, Article 622241. &gt;https://doi.org/10.3389/fceng.2020.622241 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref24">
    <label>24</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Khaled, A. and Jin, C. (2024) Tuning-Free Stochastic Optimization. &gt;https://doi.org/10.48550/arXiv.2402.07793 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref25">
    <label>25</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Karimi-Mamaghan, M., Mohammadi, M., Meyer, P., Karimi-Mamaghan, A.M. and Talbi, E. (2022) Machine Learning at the Service of Meta-Heuristics for Solving Combinatorial Optimization Problems: A State-of-the-Art. European Journal of Operational Research, 296, 393-422. &gt;https://doi.org/10.1016/j.ejor.2021.04.032
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref26">
    <label>26</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Gambella, C., Ghaddar, B. and Naoum-Sawaya, J. (2021) Optimization Problems for Machine Learning: A Survey. European Journal of Operational Research, 290, 807-828. &gt;https://doi.org/10.1016/j.ejor.2020.08.045 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref27">
    <label>27</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Pang, G., Shen, C., Cao, L. and Hengel, A.V.D. (2022) Deep Learning for Anomaly Detection: A Review. ACM Computing Surveys, 54, 1-38. &gt;https://doi.org/10.1145/3439950 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref28">
    <label>28</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Brownlee, J. (2021) Optimization for Machine Learning. In: Machine Learning Mastery, Crater Publication, 8-25.
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref29">
    <label>29</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Chen, J., Touati, C. and Zhu, Q. (2021) A Dynamic Game Approach to Designing Secure Interdependent IoT-Enabled Infrastructure Network. IEEE Transactions on Network Science and Engineering, 8, 2601-2612. &gt;https://doi.org/10.1109/tnse.2021.3100801 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref30">
    <label>30</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Knobelreiter, P., Sormann, C., Shekhovtsov, A., Fraundorfer, F. and Pock, T. (2020) Belief Propagation Reloaded: Learning Bp-Layers for Labeling Problems. 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, 13-19 June 2020, 7897-7906. &gt;https://doi.org/10.1109/cvpr42600.2020.00792 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref31">
    <label>31</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Yong, J. (2018) Optimization Theory: A Concise Introduction. World Scientific. 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref32">
    <label>32</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Injadat, M., Moubayed, A., Nassif, A.B. and Shami, A. (2021) Multi-Stage Optimized Machine Learning Framework for Network Intrusion Detection. IEEE Transactions on Network and Service Management, 18, 1803-1816. &gt;https://doi.org/10.1109/tnsm.2020.3014929
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref33">
    <label>33</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Brindha Devi, V., Ranjan, N.M. and Sharma, H. (2022) IoT Attack Detection and Mitigation with Optimized Deep Learning Techniques. Cybernetics and Systems, 55, 1702-1728. &gt;https://doi.org/10.1080/01969722.2022.2145660 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref34">
    <label>34</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Do, C., Dam, N.Q. and Lam, N.T. (2021) Optimization of Network Traffic Anomaly Detection Using Machine Learning. International Journal of Electrical and Computer Engineering, 11, 2360-2370. &gt;https://doi.org/10.11591/ijece.v11i3.pp2360-2370 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref35">
    <label>35</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Nayak, J., Meher, S.K., Souri, A., Naik, B. and Vimal, S. (2022) Extreme Learning Machine and Bayesian Optimization-Driven Intelligent Framework for IoMT Cyber-Attack Detection. The Journal of Supercomputing, 78, 14866-14891. &gt;https://doi.org/10.1007/s11227-022-04453-z 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref36">
    <label>36</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Zhang, Y., Li, P. and Wang, X. (2019) Intrusion Detection for IoT Based on Improved Genetic Algorithm and Deep Belief Network. IEEE Access, 7, 31711-31722. &gt;https://doi.org/10.1109/access.2019.2903723 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref37">
    <label>37</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Boukhamla, A. and Gaviro, J.C. (2021) CICIDS2017 Dataset: Performance Improvements and Validation as a Robust Intrusion Detection System Testbed. International Journal of Information and Computer Security, 16, 20-32. &gt;https://doi.org/10.1504/ijics.2021.117392 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref38">
    <label>38</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Ahsan, M., Rifat, N., Chowdhury, M. and Gomes, R. (2022). Intrusion Detection for IoT Network Security with Deep Neural Network. 2022 IEEE International Conference on Electro Information Technology (eIT), Mankat, 19-21 May 2022, 467-472. &gt;https://doi.org/10.1109/eit53891.2022.9814006
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref39">
    <label>39</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Karthik, M.G. and Krishnan, M.B.M. (2021) Hybrid Random Forest and Synthetic Minority over Sampling Technique for Detecting Internet of Things Attacks. Journal of Ambient Intelligence and Humanized Computing. &gt;https://doi.org/10.1007/s12652-021-03082-3 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref40">
    <label>40</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Li, L., Jamieson, K., DeSalvo, G., Rostamizadeh, A. and Talwalkar, A. (2020) Hyperband: A Novel Bandit-Based Approach to Hyperparameter Optimization. Journal of Machine Learning Research, 18, 1-52. 
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref41">
    <label>41</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Marcot, B.G. and Hanea, A.M. (2021) What Is an Optimal Value of K in K-Fold Cross-Validation in Discrete Bayesian Network Analysis? Computational Statistics, 36, 2009-2031. &gt;https://doi.org/10.1007/s00180-020-00999-9
    </mixed-citation>
   </ref>
   <ref id="scirp.146115-ref42">
    <label>42</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Stiawan, D., Idris, M.Y.B., Bamhdi, A.M. and Budiarto, R. (2020) CICIDS-2017 Dataset Feature Analysis with Information Gain for Anomaly Detection. IEEE Access, 8, 132911-132921. &gt;https://doi.org/10.1109/access.2020.3009843
    </mixed-citation>
   </ref>
  </ref-list>
 </back>
</article>