<?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><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/jcc.2022.1012001</article-id><article-id pub-id-type="publisher-id">JCC-121820</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&amp;Communications</subject></subj-group></article-categories><title-group><article-title>
 
 
  A Fast Algorithm for Training Large Scale Support Vector Machines
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Mayowa</surname><given-names>Kassim Aregbesola</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Igor</surname><given-names>Griva</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>George Mason University, Fairfax, USA</addr-line></aff><pub-date pub-type="epub"><day>15</day><month>12</month><year>2022</year></pub-date><volume>10</volume><issue>12</issue><fpage>1</fpage><lpage>15</lpage><history><date date-type="received"><day>12,</day>	<month>October</month>	<year>2022</year></date><date date-type="rev-recd"><day>13,</day>	<month>December</month>	<year>2022</year>	</date><date date-type="accepted"><day>16,</day>	<month>December</month>	<year>2022</year></date></history><permissions><copyright-statement>&#169; 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><p>
 
 
  The manuscript presents an augmented Lagrangian—fast projected gradient method (ALFPGM) with an improved scheme of working set selection, 
  pWSS, a decomposition based algorithm for training support vector classification machines (SVM). The manuscript describes the ALFPGM algorithm, provides numerical results for training SVM on large data sets, and compares the training times of ALFPGM and Sequential Minimal Minimization algorithms (SMO) from Scikit-learn library. The numerical results demonstrate that ALFPGM with the improved working selection scheme is capable of training SVM with tens of thousands of training examples in a fraction of the training time of some widely adopted SVM tools.
 
</p></abstract><kwd-group><kwd>SVM</kwd><kwd> Machine Learning</kwd><kwd> Support Vector Machines</kwd><kwd> FISTA</kwd><kwd> Fast Projected Gradient</kwd><kwd> Augmented Lagrangian</kwd><kwd> Working Set Selection</kwd><kwd> Decomposition</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>A support vector machine (SVM) [<xref ref-type="bibr" rid="scirp.121820-ref1">1</xref>] [<xref ref-type="bibr" rid="scirp.121820-ref2">2</xref>] is a supervised machine learning technique used for classification and regression [<xref ref-type="bibr" rid="scirp.121820-ref3">3</xref>]. SVM were initially designed for binary classification and have been expanded to multiclass classification that can be implemented by combining multiple binary classifiers using the pairwise coupling or one class against the rest methods [<xref ref-type="bibr" rid="scirp.121820-ref4">4</xref>]. The main advantage of the support vector machines is in their ability to achieve accurate generalization and their foundation on well developed learning theory [<xref ref-type="bibr" rid="scirp.121820-ref2">2</xref>].</p><p>Training dual soft margin SVM requires solving a large scale convex quadratic problem with a linear constraint and simple bounds for variables. To solve large scale SVM problems, decomposition methods such as sequential minimal optimization (SMO) [<xref ref-type="bibr" rid="scirp.121820-ref5">5</xref>] gained popularity due to their efficiency and low memory usage requirement. Each iteration the SMO keeps all the variables except two of them fixed and solves a small two-dimensional subproblem. In an effort to investigate a performance of decomposition based algorithms with larger working sets, one of the previous manuscripts [<xref ref-type="bibr" rid="scirp.121820-ref6">6</xref>] presented an augmented Lagrangian fast projected gradient method (ALFPGM) with working set selection for finding the solution to the SVM problem. The ALFPGM used larger working sets and trained SVM with a size up to 19020 training examples. The current study extends the previous results by presenting an updated working selection method pWSS and testing the improved algorithm on larger data sets with up to tens of thousands of training examples.</p><p>The paper is organized as follows. The next section describes the SVM training problem, the ALFPGM and SMO algorithms. Section 3 describes a new working set selection principle responsible for an efficient implementation of ALFPGM. Section 4 provides some details of the calculations. Section 5 provides numerical results. Section 6 contains concluding remarks and Section 7 discusses some future directions of further improving the efficiency of the developed algorithm.</p></sec><sec id="s2"><title>2. SVM Problem</title><p>To train the SVM, one needs to find α * = ( α 1 * , ⋯ , α m * ) T that minimizes the following objective problem:</p><p>minimize α     − ∑ i = 1 m α i + 1 2 ∑ i j α i α j y i y j K ( x i , x j ) subjectto ∑ i = 1 m α i y i = 0 ,                                 0 ≤ α i ≤ C , i = 1 , ⋯ , m . (1)</p><p>Here { ( x 1 , y 1 ) , ⋯ , ( x m , y m ) } is a set of m labeled data points where x i ∈ ℝ n is a vector of features and y i ∈ { − 1,1 } represent the label indicating the class to which x i belongs. The Matrix Q with the elements q i j = y i y j K ( x i , x i ) is positive semi-definite but usually dense.</p><p>The sequential minimal optimization (SMO) algorithm developed by Platt [<xref ref-type="bibr" rid="scirp.121820-ref7">7</xref>] is one of the most efficient and widely used algorithms to solve (1). It is a low memory usage algorithm that iteratively solves two-dimensional QP subproblems. The QP subproblems are solved analytically. Many popular SVM solvers are based on SMO.</p><p>There have been several attempts to further speed up the SMO [<xref ref-type="bibr" rid="scirp.121820-ref8">8</xref>] [<xref ref-type="bibr" rid="scirp.121820-ref9">9</xref>] [<xref ref-type="bibr" rid="scirp.121820-ref10">10</xref>]. In particular, there have been attempts on parallelizing SMO [<xref ref-type="bibr" rid="scirp.121820-ref10">10</xref>]. However, selection of the working set in SMO depends on the violating pairs, which are constantly changed each iteration, making it challenging to develop a parallelized algorithm for the SMO [<xref ref-type="bibr" rid="scirp.121820-ref6">6</xref>]. Other attempts have focused on parallelizing selections of larger working sets of more than one pair. The approach presented here follows the latter path.</p><sec id="s2_1"><title>2.1. SVM Decomposition</title><p>Matrix Q is dense and it is inefficient and often memory prohibitive to populate and store Q in the operating memory for large training data. Therefore decomposition methods that consider only a small subset of variables per iteration [<xref ref-type="bibr" rid="scirp.121820-ref11">11</xref>] [<xref ref-type="bibr" rid="scirp.121820-ref12">12</xref>] are used to train an SVM with a large number of training examples.</p><p>Let B be the subset of selected l variables called the working set. Since each iteration involves only l rows and columns of the matrix Q, the decomposition methods use the operating memory economically [<xref ref-type="bibr" rid="scirp.121820-ref11">11</xref>].</p><p>The algorithm repeats the select working set then optimize process until the global optimality conditions are satisfied. While B denotes the working set with l variables, N denotes the non-working set with ( m − l ) variables. Then, α , y and Q can be correspondingly written as:</p><p>α = [ α B α N ] ,   y = [ y B y N ] ,   Q = [ Q B B Q B N Q N B Q N N ] .</p><p>The optimization subproblem can be rewritten as</p><p>minimize α B     1 2 [ α B T α N T ] [ Q B B Q B N Q N B Q N N ] [ α B α N ] − [ e B T e N T ] [ α B α N ] subjectto α B T y B + α N T y N = 0                               0 ≤ α B ≤ C . (2)</p><p>with a fixed α N . The problem (2) can be rewritten as</p><p>minimize α B     1 2 α B T Q BB α B + α B T χ subjectto α B T y B + G k = 0                               0 ≤ α B ≤ C . (3)</p><p>where χ = Q BN α N − e B = q − e B and G k = α N T y N .</p><p>The reduced problem (3) can be solved much faster than the original problem (1). The resulting algorithm is shown as Algorithm 1.</p><disp-formula id="scirp.121820-formula351"><graphic  xlink:href="//html.scirp.org/file/1-1732026x17.png?20230113121116649"  xlink:type="simple"/></disp-formula></sec><sec id="s2_2"><title>2.2. Augmented Lagrangian—Fast Projected Gradient Method for SVM</title><p>A relatively simple and efficient algorithm capable of training medium size SVM with up to a few tens of thousands of data points was proposed in [<xref ref-type="bibr" rid="scirp.121820-ref13">13</xref>]. The algorithm takes advantage of two methods: one is a fast projected gradient method for solving a minimization problem with simple bounds on variables [<xref ref-type="bibr" rid="scirp.121820-ref14">14</xref>] and the second is an augmented Lagrangian method [<xref ref-type="bibr" rid="scirp.121820-ref15">15</xref>] [<xref ref-type="bibr" rid="scirp.121820-ref16">16</xref>] employed to satisfy the only linear equality constraint. The method projects the primal variables onto the “box-like” set: 0 ≤ α i ≤ C , i ∈ B .</p><p>Using the following definitions</p><p>f ( α ) = ∑ i ∈ B     α i ( q i − 1 ) + 1 2 ∑ i , j ∈ B     α i α j y i y j K ( x i , x j ) g ( α ) = ∑ i ∈ B     y i α i + G k (4)</p><p>and the bounded set:</p><p>B o x = { α ∈ ℝ l : 0 ≤ α i ≤ C ,   i ∈ B } , (5)</p><p>the optimization problem (3) can be rewritten as follows:</p><p>minimize α     f ( α ) subjectto g ( α ) = 0                             α ∈ B o x (6)</p><p>The augmented Lagrangian is defined as</p><p>L μ ( α , λ ) = f ( α ) − λ g ( α ) + μ g ( α ) 2 2 , (7)</p><p>where λ ∈ ℝ the Lagrange multiplier that corresponds to the only equality constraint and μ &gt; 0 is the scaling parameter.</p><p>The augmented Lagrangian method is a sequence of inexact minimizations of L μ ( α , λ ) in α on the B o x set:</p><p>α ^ ≈ α ( λ ) = arg min α ∈ B o x L μ ( α , λ ) (8)</p><p>followed by updating the Lagrange multiplier λ :</p><p>λ ^ = λ − μ g ( α ^ ) . (9)</p><p>The stopping criteria for (8) uses the following function that measures the violation of the first order optimality conditions of (8):</p><p>ν ( α , λ ) = max 1 ≤ i ≤ m ν i ( α , λ ) , (10)</p><p>where</p><p>ν i ( α , λ ) = { | ∇ α L μ ( α , λ ) i |             0 &lt; α i &lt; C max { 0, − ∇ α L μ ( α , λ ) i }         α i = 0 max { 0, ∇ α L μ ( α , λ ) i }       α i = C (11)</p><p>The minimization (8) (the inner loop) is performed by the fast projected gradient method (FPGM). The inner loop exits when ν ( α , λ ) &lt; ε . The final stopping criteria for the augmented Lagrangian method uses μ ( α , λ ) = max { ν ( α , λ ) , | g ( α ) | } , which measures the violation of the optimality conditions for (6).</p><p>Algorithm 2 describes the ALFPGM (see [<xref ref-type="bibr" rid="scirp.121820-ref6">6</xref>] for more detail). The convergence of Algorithm 2 is established in [<xref ref-type="bibr" rid="scirp.121820-ref17">17</xref>].</p><disp-formula id="scirp.121820-formula352"><graphic  xlink:href="//html.scirp.org/file/1-1732026x35.png?20230113121116649"  xlink:type="simple"/></disp-formula></sec></sec><sec id="s3"><title>3. PWSS Working Set Selection</title><p>The flow chart describing pWSS is shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>. An important issue of any decomposition method is how to select the working set B. First, a working set selection (WSS) method WSS<sub>2nd</sub> that uses the second order information [<xref ref-type="bibr" rid="scirp.121820-ref18">18</xref>] is described.</p><p>Consider the sets:</p><p>I u p ( α ) ≡ { t | y t = 1 , α t &lt; C   or   y t = − 1 , α t &gt; 0 } , I l o w ( α ) ≡ { t | y t = − 1 , α t &lt; C   or   y t = 1 , α t &gt; 0 } .</p><p>Then let us define</p><p>q t ( α ) = − y t ∇ f ( α ) t .</p><p>In WSS<sub>2nd</sub>, one selects</p><p>i ∈ arg max t ∈ I u p ( α ) { q t ( α ) } , (14)</p><p>and</p><p>j ∈ arg min t ∈ I l o w ( α ) { − b i t 2 a ^ i t : q t ( α ) &lt; q i ( α ) } . (15)</p><p>with</p><p>a i j = K i i + K j j − 2 K i j &gt; 0 , a ^ i j = { a i j ,   if   a i j &gt; 0 , τ b i j = q i ( α ) − q j ( α ) &gt; 0 ,</p><p>where τ is a small positive number.</p><sec id="s3_1"><title>3.1. Limiting the Search Space for I<sub>up</sub> and I<sub>low</sub></title><p>One of the challenges of the previously developed dual decomposition WSS<sub>2nd</sub> is that a particular data set point can be selected multiple times in different iterations of decomposition in the working set, often increasing the SVM training time. The previously developed algorithm [<xref ref-type="bibr" rid="scirp.121820-ref6">6</xref>] is improved, and the changes to pWSS are made by limiting the search space of I<sub>up</sub> and I<sub>low</sub> as described below.</p></sec><sec id="s3_2"><title>3.2. MinMaxLimiter Algorithm</title><p>The MinMaxLimiter algorithm with the following changes to pWSS is proposed:</p><p>• Some elements of α that no longer change after many iterations, are eliminated: ‖ α t − α t − 1 ‖ &lt; δ α , where α t − 1 , α t ∈ B are two consecutive iterates, and δ α is a user defined threshold.</p><p>• Another introduced parameter is minAlphaOpt, which is the minimum number of times a data index is used in working set. After this threshold, if the value of α i , i = 1, ⋯ , m is 0 or C, then that data point index is no longer considered</p><p>• The last introduced parameter is maxAlphaOpt, which is the maximum number of times a training examples is used in the decomposition rounds.</p><p>m i n A l p h a O p t = ∞ and m a x A l p h a O p t = ∞ will result in considering every α in every iteration.</p><disp-formula id="scirp.121820-formula353"><graphic  xlink:href="//html.scirp.org/file/1-1732026x51.png?20230113121116649"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.121820-formula354"><graphic  xlink:href="//html.scirp.org/file/1-1732026x52.png?20230113121116649"  xlink:type="simple"/></disp-formula></sec><sec id="s3_3"><title>3.3. Optimizing j Search Using MinAlphaCheck</title><p>Another modification to WSS<sub>2nd</sub> is the introduction of parameter minAlphaCheck. This is used to reduce the search space of j in (13) to the first minAlphaCheck in the sorted I<sub>low</sub> set. The experimental results show that this converges and is faster than WSS<sub>2nd</sub>.</p></sec></sec><sec id="s4"><title>4. Implementation</title><sec id="s4_1"><title>4.1. Kernel Matrix Computation</title><p>The cache technique is used to store previously computed rows to access them when the same kernel value needs to be recomputed. The amount of cached kernel is a selectable parameter. The same Least Recently Used (LRU) LRU strategy that SMO implemented in Scikit-learn (Sklearn) was used, and it is a good basis for comparing the results obtained using the SVM training methods. Previous discussions [<xref ref-type="bibr" rid="scirp.121820-ref8">8</xref>] [<xref ref-type="bibr" rid="scirp.121820-ref10">10</xref>] have been held on the ineffectiveness of the LRU strategy. However, that is beyond the scope of this work.</p><p>To compute the kernel matrix, Intel MKL is used. The kernel matrix can be computed efficiently using ‖ x i ‖ 2 and the elements of matrix XX', where X is the matrix with the rows made of the data vectors x i . Intel MKL’s cblas_dgemv</p><p>is used to compute f = 1 2 α T Q α − e T α .</p></sec><sec id="s4_2"><title>4.2. Computing the Lipschitz Constant L</title><p>The Fast Projected Gradient Method (FPGM) requires estimation of the Lipschitz constant L. Since L μ is of quadratic form with respect to α ,</p><p>L = ‖ ∇ α α 2 L μ ( ⋅ ) ‖ = ‖ Q B + μ y B y B T ‖ ,</p><p>where the matrix spectral norm is the largest singular value of a matrix.</p><p>To estimate L first ‖ Q B ‖ was estimated. Since Q B is symmetric and positive semidefinite, ‖ Q B ‖ = λ 1 is the largest eigenvalue of Q B .</p><p>The largest eigenvalue λ 1 can be efficiently computed using the power method. After estimating λ 1 with a few power iterations, the upper bound estimates L as follows:</p><p>L ≈ λ 1 + m μ . (16)</p></sec></sec><sec id="s5"><title>5. Experimental Results</title><p>For testing, 11 binary classification training data sets (shown in <xref ref-type="table" rid="table1">Table 1</xref>) were selected with a number of training examples ranging from 18201 to 98528 from University of California, Irvine (UCI) Machine Learning Repository [<xref ref-type="bibr" rid="scirp.121820-ref19">19</xref>] and https://www.openml.org/. One of the tests, Test 2, was the largest test used in the previous work [<xref ref-type="bibr" rid="scirp.121820-ref6">6</xref>]. All simulations were done using a desktop with dual Intel Xeon 2.50 GHz, 12 Cores processors sharing 64 GB of computer memory. In all cases, C = 100 was used for all tests. The data was normalized and radial basis kernel was used with γ shown in <xref ref-type="table" rid="table1">Table 1</xref>. The scaling parameter μ used for all the experiments is μ = 0.1 as suggested in [<xref ref-type="bibr" rid="scirp.121820-ref13">13</xref>]. The parameters in pWSS were taken as δ α = 10 − 6 , m i n A l p h a O p t = 5 , m a x A l p h a O p t = 20 . The accuracy of solution was selected ε = 10 − 2 . The SVM training times by ALFPGM were compared with results obtained using SMO implemented in Scikit-learn (Sklearn) [<xref ref-type="bibr" rid="scirp.121820-ref20">20</xref>] for the SVM training. The same data inputs were used in SMO and ALFPGM.</p><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> Data used for testing</title></caption><table><tbody><thead><tr><th align="center" valign="middle" ></th><th align="center" valign="middle" >Test</th><th align="center" valign="middle" >m</th><th align="center" valign="middle" >n</th><th align="center" valign="middle" ># -1</th><th align="center" valign="middle" ># 1</th><th align="center" valign="middle" >γ</th><th align="center" valign="middle" >Description</th></tr></thead><tr><td align="center" valign="middle" >1</td><td align="center" valign="middle" >Riccardo</td><td align="center" valign="middle" >18201</td><td align="center" valign="middle" >4295</td><td align="center" valign="middle" >3201</td><td align="center" valign="middle" >15000</td><td align="center" valign="middle" >0.500</td><td align="center" valign="middle" >https://www.openml.org/d/41161</td></tr><tr><td align="center" valign="middle" >2</td><td align="center" valign="middle" >Magictelescope</td><td align="center" valign="middle" >19020</td><td align="center" valign="middle" >11</td><td align="center" valign="middle" >12332</td><td align="center" valign="middle" >6573</td><td align="center" valign="middle" >0.500</td><td align="center" valign="middle" >Data are MC generated to simulate registration of high energy gamma particles in an atmospheric Cherenkov telescope.</td></tr><tr><td align="center" valign="middle" >3</td><td align="center" valign="middle" >2d_planes</td><td align="center" valign="middle" >26714</td><td align="center" valign="middle" >10</td><td align="center" valign="middle" >13369</td><td align="center" valign="middle" >13345</td><td align="center" valign="middle" >2.000</td><td align="center" valign="middle" >https://www.openml.org/d/727</td></tr><tr><td align="center" valign="middle" >4</td><td align="center" valign="middle" >Nomao</td><td align="center" valign="middle" >32062</td><td align="center" valign="middle" >118</td><td align="center" valign="middle" >22251</td><td align="center" valign="middle" >9811</td><td align="center" valign="middle" >5.000</td><td align="center" valign="middle" >The dataset has been enriched during the Nomao Challenge: organized along with the ALRA workshop.</td></tr><tr><td align="center" valign="middle" >5</td><td align="center" valign="middle" >Webdata_wXa</td><td align="center" valign="middle" >36974</td><td align="center" valign="middle" >123</td><td align="center" valign="middle" >8874</td><td align="center" valign="middle" >28100</td><td align="center" valign="middle" >1.000</td><td align="center" valign="middle" >https://www.openml.org/d/350</td></tr><tr><td align="center" valign="middle" >6</td><td align="center" valign="middle" >Fried</td><td align="center" valign="middle" >40768</td><td align="center" valign="middle" >10</td><td align="center" valign="middle" >20341</td><td align="center" valign="middle" >20427</td><td align="center" valign="middle" >5.000</td><td align="center" valign="middle" >https://www.openml.org/d/901</td></tr><tr><td align="center" valign="middle" >7</td><td align="center" valign="middle" >Bank-marketing</td><td align="center" valign="middle" >45211</td><td align="center" valign="middle" >16</td><td align="center" valign="middle" >5289</td><td align="center" valign="middle" >39922</td><td align="center" valign="middle" >2.000</td><td align="center" valign="middle" >https://www.openml.org/d/1461. The data is related with direct marketing campaigns of a Portuguese banking institution. The marketing campaigns were based on phone calls. Often, more than one contact to the same client was required, in order to access if the product (bank term deposit) would be (or not) subscribed.</td></tr><tr><td align="center" valign="middle" >8</td><td align="center" valign="middle" >Electricity</td><td align="center" valign="middle" >45312</td><td align="center" valign="middle" >8</td><td align="center" valign="middle" >19237</td><td align="center" valign="middle" >26075</td><td align="center" valign="middle" >5.000</td><td align="center" valign="middle" >This data was collected from the Australian New South Wales Electricity Market. In this market, prices are not fixed and are affected by demand and supply of the market. https://www.openml.org/d/151</td></tr><tr><td align="center" valign="middle" >9</td><td align="center" valign="middle" >Run_or_walk_information</td><td align="center" valign="middle" >88588</td><td align="center" valign="middle" >6</td><td align="center" valign="middle" >44365</td><td align="center" valign="middle" >44223</td><td align="center" valign="middle" >1.000</td><td align="center" valign="middle" >This dataset describes whether a person is running or walking based on deep neural networks and sensor data collected from iOS devices.</td></tr><tr><td align="center" valign="middle" >10</td><td align="center" valign="middle" >Numerai28.6</td><td align="center" valign="middle" >96320</td><td align="center" valign="middle" >21</td><td align="center" valign="middle" >48658</td><td align="center" valign="middle" >47662</td><td align="center" valign="middle" >1.000</td><td align="center" valign="middle" >Encrypted Stock Market Training Data from Numer.ai.</td></tr><tr><td align="center" valign="middle" >11</td><td align="center" valign="middle" >VehicleNorm</td><td align="center" valign="middle" >98528</td><td align="center" valign="middle" >101</td><td align="center" valign="middle" >49264</td><td align="center" valign="middle" >49264</td><td align="center" valign="middle" >1.000</td><td align="center" valign="middle" >Vehicle classification in distributed sensor networks. https://www.openml.org/d/1242.</td></tr></tbody></table></table-wrap>ALFPGM—Investigating of Using Different Number of Pairs p<p>The optimal number of pairs p needed for the training with ALFPGM is determined with numerical experiments using training Tests 2, 6 and 10, which are representatives of small, medium size, and large training sets. In all cases, the pWSS method was employed for the pairs selection. The results are presented in Figures 2-4. The results suggest that for ALFPGM the optimum number of pairs is 50 ≤ p ≤ 100 .</p><p>There are several factors that come into play when varying the number of pairs p.</p><p>1) The size of p determines the amount of time it takes to find the size of the working set. The larger the size of p, the longer it takes to find the working set.</p><p>2) The smaller the size of p, the more the number of decompositions needed to solve the SVM problem.</p><p>3) The larger the size of p, the longer it takes to solve the SVM subproblems.</p><p>4) The larger the size of p, the greater the probability that the Hessian matrix of the SVM subproblem may be degenerate.</p><p><xref ref-type="table" rid="table2">Table 2</xref> provides numerical results for training SVM with the ALFPGM and SMO. For each testing dataset, the table shows the number of training examples, the number of features. Then for both ALFPGM and SMO algorithms the table shows the training errors (the fractions of misclassified training examples), the training times, the number of performed decompositions (working set selections), the number of support vectors, and the optimal objective function values. To calculate training times, each simulation scenario was averaged over 5 runs. The results also are visualized in Figures 5-7. The training sets are arranged in the order of increasing the number of training examples. The figures demonstrate that for most of the cases the ALFPGM outperformed the SMO in training time for similar classification error.</p><p><xref ref-type="fig" rid="fig6">Figure 6</xref> shows that the training errors are similar demonstrating that both algorithms produced similar results. The same conclusion can be drawn by observing the similar values of the optimal objective functions for both algorithms in <xref ref-type="table" rid="table2">Table 2</xref>. Finally, <xref ref-type="fig" rid="fig8">Figure 8</xref> shows the normalized training times i.e. the training times divided by the number of training examples. As one can see, the ALFPGM produces a smaller variance in the normalized times than that of the SMO algorithm.</p><table-wrap id="table2" ><label><xref ref-type="table" rid="table2">Table 2</xref></label><caption><title> ALFPGM and SMO comparison</title></caption><table><tbody><thead><tr><th align="center" valign="middle" ></th><th align="center" valign="middle" ></th><th align="center" valign="middle" ></th><th align="center" valign="middle"  colspan="5"  >ALFPGM</th><th align="center" valign="middle"  colspan="5"  >SMO</th></tr></thead><tr><td align="center" valign="middle" >Test</td><td align="center" valign="middle" >numData</td><td align="center" valign="middle" >numFeat</td><td align="center" valign="middle" >train_err</td><td align="center" valign="middle" >wall_time (sec)</td><td align="center" valign="middle" >nDecomp</td><td align="center" valign="middle" >nSv</td><td align="center" valign="middle" >objval</td><td align="center" valign="middle" >train_err</td><td align="center" valign="middle" >wall_time</td><td align="center" valign="middle" >nDecomp</td><td align="center" valign="middle" >nSv</td><td align="center" valign="middle" >objval</td></tr><tr><td align="center" valign="middle" >1</td><td align="center" valign="middle" >18201</td><td align="center" valign="middle" >4295</td><td align="center" valign="middle" >0</td><td align="center" valign="middle" >139.096</td><td align="center" valign="middle" >275</td><td align="center" valign="middle" >18201</td><td align="center" valign="middle" >−5175.65</td><td align="center" valign="middle" >0</td><td align="center" valign="middle" >7870.151</td><td align="center" valign="middle" >49244</td><td align="center" valign="middle" >18201</td><td align="center" valign="middle" >−5175.65</td></tr><tr><td align="center" valign="middle" >2</td><td align="center" valign="middle" >19020</td><td align="center" valign="middle" >11</td><td align="center" valign="middle" >0</td><td align="center" valign="middle" >22.13577</td><td align="center" valign="middle" >294</td><td align="center" valign="middle" >18905</td><td align="center" valign="middle" >−8577.31</td><td align="center" valign="middle" >0</td><td align="center" valign="middle" >52.3462</td><td align="center" valign="middle" >62399</td><td align="center" valign="middle" >18905</td><td align="center" valign="middle" >−8577.31</td></tr><tr><td align="center" valign="middle" >3</td><td align="center" valign="middle" >26714</td><td align="center" valign="middle" >10</td><td align="center" valign="middle" >4.41</td><td align="center" valign="middle" >46.60157</td><td align="center" valign="middle" >485</td><td align="center" valign="middle" >26714</td><td align="center" valign="middle" >−231591</td><td align="center" valign="middle" >4.41</td><td align="center" valign="middle" >55.2686</td><td align="center" valign="middle" >39953</td><td align="center" valign="middle" >26714</td><td align="center" valign="middle" >−244605</td></tr><tr><td align="center" valign="middle" >4</td><td align="center" valign="middle" >32062</td><td align="center" valign="middle" >118</td><td align="center" valign="middle" >0.27</td><td align="center" valign="middle" >59.22488</td><td align="center" valign="middle" >630</td><td align="center" valign="middle" >20998</td><td align="center" valign="middle" >−15232.9</td><td align="center" valign="middle" >0.15</td><td align="center" valign="middle" >399.0199</td><td align="center" valign="middle" >49785</td><td align="center" valign="middle" >21016</td><td align="center" valign="middle" >−20231.4</td></tr><tr><td align="center" valign="middle" >5</td><td align="center" valign="middle" >36974</td><td align="center" valign="middle" >123</td><td align="center" valign="middle" >4.59</td><td align="center" valign="middle" >100.483</td><td align="center" valign="middle" >843</td><td align="center" valign="middle" >36974</td><td align="center" valign="middle" >−347874</td><td align="center" valign="middle" >4.59</td><td align="center" valign="middle" >1215.305</td><td align="center" valign="middle" >110026</td><td align="center" valign="middle" >36974</td><td align="center" valign="middle" >−350686</td></tr><tr><td align="center" valign="middle" >6</td><td align="center" valign="middle" >40768</td><td align="center" valign="middle" >10</td><td align="center" valign="middle" >0.2</td><td align="center" valign="middle" >81.7774</td><td align="center" valign="middle" >659</td><td align="center" valign="middle" >11701</td><td align="center" valign="middle" >−16033.5</td><td align="center" valign="middle" >0</td><td align="center" valign="middle" >166.716</td><td align="center" valign="middle" >79748</td><td align="center" valign="middle" >11123</td><td align="center" valign="middle" >−17599.1</td></tr><tr><td align="center" valign="middle" >7</td><td align="center" valign="middle" >45211</td><td align="center" valign="middle" >16</td><td align="center" valign="middle" >0</td><td align="center" valign="middle" >77.09719</td><td align="center" valign="middle" >508</td><td align="center" valign="middle" >45211</td><td align="center" valign="middle" >−9340.53</td><td align="center" valign="middle" >0</td><td align="center" valign="middle" >213.2611</td><td align="center" valign="middle" >96930</td><td align="center" valign="middle" >45211</td><td align="center" valign="middle" >−9340.53</td></tr><tr><td align="center" valign="middle" >8</td><td align="center" valign="middle" >45312</td><td align="center" valign="middle" >8</td><td align="center" valign="middle" >0.92</td><td align="center" valign="middle" >337.4581</td><td align="center" valign="middle" >2551</td><td align="center" valign="middle" >32681</td><td align="center" valign="middle" >−120386</td><td align="center" valign="middle" >0.7</td><td align="center" valign="middle" >336.2932</td><td align="center" valign="middle" >170816</td><td align="center" valign="middle" >32571</td><td align="center" valign="middle" >−135219</td></tr><tr><td align="center" valign="middle" >9</td><td align="center" valign="middle" >88588</td><td align="center" valign="middle" >6</td><td align="center" valign="middle" >0.05</td><td align="center" valign="middle" >359.1051</td><td align="center" valign="middle" >1223</td><td align="center" valign="middle" >43391</td><td align="center" valign="middle" >−25071.8</td><td align="center" valign="middle" >0.03</td><td align="center" valign="middle" >521.7201</td><td align="center" valign="middle" >122003</td><td align="center" valign="middle" >43331</td><td align="center" valign="middle" >−26753.4</td></tr><tr><td align="center" valign="middle" >10</td><td align="center" valign="middle" >96320</td><td align="center" valign="middle" >21</td><td align="center" valign="middle" >0</td><td align="center" valign="middle" >133.8112</td><td align="center" valign="middle" >327</td><td align="center" valign="middle" >96302</td><td align="center" valign="middle" >−49869.2</td><td align="center" valign="middle" >0</td><td align="center" valign="middle" >1056.651</td><td align="center" valign="middle" >138749</td><td align="center" valign="middle" >96304</td><td align="center" valign="middle" >−49916.9</td></tr><tr><td align="center" valign="middle" >11</td><td align="center" valign="middle" >98528</td><td align="center" valign="middle" >101</td><td align="center" valign="middle" >0.05</td><td align="center" valign="middle" >932.8615</td><td align="center" valign="middle" >1251</td><td align="center" valign="middle" >98411</td><td align="center" valign="middle" >−55816.7</td><td align="center" valign="middle" >0.03</td><td align="center" valign="middle" >5231.517</td><td align="center" valign="middle" >166893</td><td align="center" valign="middle" >98390</td><td align="center" valign="middle" >−56792.7</td></tr><tr><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" >Total time</td><td align="center" valign="middle" >2289.652</td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" >17118.25</td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td></tr></tbody></table></table-wrap></sec><sec id="s6"><title>6. Conclusions</title><p>The manuscript presents the results on training support vector machines using an augmented Lagrangian fast projected gradient method (ALFPGM) for large data sets. In particular, the ALFPGM is adapted for training using high performance computing techniques. Highly optimized linear algebra routines were used in the implementation to speed up some of the computations.</p><p>A working set decomposition scheme for p pairs selection is developed and optimized. Since working set selection takes a large portion of the overall training time, finding an optimal selection of pairs is the key to using multiple pairs in the decomposition. Numerical results indicate that the optimal choice of the number of pairs in the working set p for ALFPGM is 50 - 100 pairs. It is shown that in some examples the selection of pairs can be truncated earlier without compromising the overall results but with significantly reducing training times.</p><p>Finally, the comparison of training performance of the ALFPGM with that of the SMO from the Scikit-learn library demonstrates that the training times with ALFPGM is consistently smaller than those for the SMO for the tested large training sets.</p></sec><sec id="s7"><title>7. Future Work</title><p>The results demonstrate that the choice of the number of pairs p is important as it determines the number of decompositions. Even though the numerical experiments determined a critical range of values for the optimal value of pairs p, the pWSS can be further improved for multiple pair selection and the total training time will be further reduced.</p><p>One possible direction of achieving that improvement is to determine an optimal dependence of the number of pairs p on the size of the training set. Selecting optimal values of WSS<sub>minAlphaCheck</sub> and minAlphaOpt used in pWSS<sub>3</sub> needs to be further explored. Finding the optimal values of ALFPGM parameters based on the input data can further improve the efficiency of the ALFPGM.</p><p>A use of graphics processing units (GPU), which are getting less expensive and with more capabilities than before, should be revisited in future. In the future, the most time consuming parts of the algorithm such as computing similarity kernel measures can be done using the GPU.</p></sec><sec id="s8"><title>Conflicts of Interest</title><p>The authors declare no conflicts of interest regarding the publication of this paper.</p></sec><sec id="s9"><title>Cite this paper</title><p>Aregbesola, M.K. and Griva, I. (2022) A Fast Algorithm for Training Large Scale Support Vector Machines. Journal of Computer and Communications, 10, 1-15. https://doi.org/10.4236/jcc.2022.1012001</p></sec></body><back><ref-list><title>References</title><ref id="scirp.121820-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Vapnik, V. (1982) Estimation of Dependences Based on Empirical Data (Springer Series in Statistics). Springer-Verlag, New York.</mixed-citation></ref><ref id="scirp.121820-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Vapnik, V.N. (1995) The Nature of Statistical Learning Theory. Springer-Verlag, New York. https://doi.org/10.1007/978-1-4757-2440-0</mixed-citation></ref><ref id="scirp.121820-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Smola, A.J. and Scholkopf, B. (2004) A Tutorial on Support Vector Regression. Statistics and Computing, 14, 199-222. https://doi.org/10.1023/B:STCO.0000035301.49549.88</mixed-citation></ref><ref id="scirp.121820-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Hastie, T. and Tibshirani, R. (1998) Classification by Pairwise Coupling. In: Proceedings of the 1997 Conference on Advances in Neural Information Processing Systems 10, MIT Press, Cambridge, 507-513. http://dl.acm.org/citation.cfm?id=302528.302744</mixed-citation></ref><ref id="scirp.121820-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Keerthi, S. and Gilbert, E. (2002) Convergence of a Generalized SMO Algorithm for SVM Classifier Design. Machine Learning, 46, 351-360. https://doi.org/10.1023/A:1012431217818</mixed-citation></ref><ref id="scirp.121820-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Aregbesola, M. and Griva, I. (2021) Augmented Lagrangian—Fast Projected Gradient Algorithm with Working Set Selection for Training Support Vector Machines. Journal of Applied and Numerical Optimization, 3, 3-20. http://jano.biemdas.com/archives/1224</mixed-citation></ref><ref id="scirp.121820-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Platt, J. (1998) Sequential Minimal Optimization: A Fast Algorithm for Training Support Vector Machines. Microsoft Corporation, Tech. Rep.</mixed-citation></ref><ref id="scirp.121820-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Lin, C. (2001) On the Convergence of the Decomposition Method for Support Vector Machines. IEEE Transactions on Neural Networks, 12, 1288-1298. https://doi.org/10.1109/72.963765</mixed-citation></ref><ref id="scirp.121820-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Keerthi, S.S., Shevade, S.K., Bhattacharyya, C. and Murthy, K.R.K. (2001) Improvements to Platt’s SMO Algorithm for SVM Classifier Design. Neural Computation, 13, 637-649. https://doi.org/10.1162/089976601300014493</mixed-citation></ref><ref id="scirp.121820-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Wei, W., Li, C. and Guo, J. (2018) Improved Parallel Algorithms for Sequential Minimal Optimization of Classification Problems. 2018 IEEE 20th International Conference on High Performance Computing and Communications; IEEE 16th International Conference on Smart City; IEEE 4th International Conference on Data Science and Systems (HPCC/SmartCity/DSS), Exeter, 28-30 June 2018, 6-13. https://doi.org/10.1109/HPCC/SmartCity/DSS.2018.00033</mixed-citation></ref><ref id="scirp.121820-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Chen, P.-H., Fan, R.-E. and Lin, C.-J. (2006) A Study on SMO-Type Decomposition Methods for Support Vector Machines. IEEE Transactions on Neural Networks, 17, 893-908. https://doi.org/10.1109/TNN.2006.875973</mixed-citation></ref><ref id="scirp.121820-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">Zhang, Q., Wang, J., Lu, A., Wang, S. and Ma, J. (2018) An Improved SMO Algorithm for Financial Credit Risk Assessment—Evidence from China’s Banking. Neurocomputing, 272, 314-325. http://www.sciencedirect.com/science/article/pii/S0925231217312328</mixed-citation></ref><ref id="scirp.121820-ref13"><label>13</label><mixed-citation publication-type="other" xlink:type="simple">Bloom, V., Griva, I. and Quijada, F. (2016) Fast Projected Gradient Method for Support Vector Machines. Optimization and Engineering, 17, 651-662. https://doi.org/10.1007/s11081-016-9328-z</mixed-citation></ref><ref id="scirp.121820-ref14"><label>14</label><mixed-citation publication-type="other" xlink:type="simple">Polyak, R.A. (2015) Projected Gradient Method for Non-Negative Least Square. Infinite Products of Operators and Their Applications. A Research Workshop of the Israel Science Foundation, Haifa, 21-24 May 2012, 167-179. https://doi.org/10.1090/conm/636/12735</mixed-citation></ref><ref id="scirp.121820-ref15"><label>15</label><mixed-citation publication-type="other" xlink:type="simple">Hestenes, M.R. (1969) Multiplier and Gradient Methods. Journal of Optimization Theory and Applications, 4, 303-320. https://doi.org/10.1007/BF00927673</mixed-citation></ref><ref id="scirp.121820-ref16"><label>16</label><mixed-citation publication-type="other" xlink:type="simple">Powell, M.J.D. (1978) Algorithms for Nonlinear Constraints That Use Lagrangian Functions. Mathematical Programming, 14, 224-248. https://doi.org/10.1007/BF01588967</mixed-citation></ref><ref id="scirp.121820-ref17"><label>17</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Griva</surname><given-names> I. </given-names></name>,<etal>et al</etal>. (<year>2018</year>)<article-title>Convergence Analysis of Augmented Lagrangian—Fast Projected Gradient Method for Convex Quadratic Problems</article-title><source> Pure and Applied Functional Analysis</source><volume> 3</volume>,<fpage> 417</fpage>-<lpage>428</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.121820-ref18"><label>18</label><mixed-citation publication-type="other" xlink:type="simple">Fan, R.-E., Chen, P.-H. and Lin, C.-J. (2005) Working Set Selection Using Second Order Information for Training Support Vector Machines. Journal of Machine Learning Research, 6, 1889-1918. http://dl.acm.org/citation.cfm?id=1046920.1194907</mixed-citation></ref><ref id="scirp.121820-ref19"><label>19</label><mixed-citation publication-type="other" xlink:type="simple">Dua, D. and Gra, C. (2017) UCI Machine Learning Repository. http://archive.ics.uci.edu/ml</mixed-citation></ref><ref id="scirp.121820-ref20"><label>20</label><mixed-citation publication-type="other" xlink:type="simple">Pedregosa, F., Varoquaux, G., Gramfort, A., et al. (2011) Scikit-Learn: Machine Learning in Python. Journal of Machine Learning Research, 12, 2825-2830.</mixed-citation></ref></ref-list></back></article>