# Unknown Traffic Recognition Based on Multi-Feature Fusion and Incremental Learning
## 3 Design of Framework
### Incremental SVM Classifier  
The features of the unknown traffic detected by the algorithm are also stored in the feature database, which poses higher demands on our classifier. It needs to gradually learn from the updated feature library, becoming a new multi-classifier capable of recognizing a wider range of application types.  
The essence of SVM is the estimation of the optimal decision function. In \(N\)-classes classification problems, the goal is to find the optimal \(N-1\) hyperplanes. We first consider the classification of known traffic using SVM. The mathematical description of the known feature database \(\mathcal{F}\) is shown in Equation (13), which contains \(n\) features, each with a label that belong to one of the \(N\) traffic classes. Equation (14) demonstrates the optimization objective function of a multi-class SVM based on the Lagrange equation, where \(w^{l}\) is a one-versus-rest hyperplane vector, \(b\) is bias, \(e^{il}\) is a slack variable, \(\Phi(\cdot)\) denotes the kernel function, and \(\psi\) denotes a penalty factor.  
\[\begin{split}\mathcal{F}=& f_{Known}\\ =&\{(f^{i}_{K},y^{i}_{K})|i\in[1,n],\\ & y^{i}_{K}\in\{Class_{1},Class_{2},\ldots,Class_{N}\}\}\\ \end{split} \tag{13}\]  
\[\begin{split}&\min_{w,b,e}W(w,b,e)=\frac{\sum_{l=1}^{N}\|w^{l}\|^{2 }}{2}+\psi\sum_{i=1}^{n}\sum_{l=1}^{N}(e^{il})^{2}\\ & s.t.\ y^{i}[(w^{l})^{T}\Phi(x^{i})+b^{l}]=1-e^{il}\\ \end{split} \tag{14}\]  
In the current state \(s\), the weight vector \(w_{s}\) and bias vector \(b_{s}\) of the hyperplane are described in Equations (15) and (16), respectively.  
\[w_{s}=[w^{1}_{s},w^{2}_{s},\ldots,w^{N}_{s}] \tag{15}\]  
\[b_{s}=[b^{1}_{s},b^{2}_{s},\ldots,b^{N}_{s}] \tag{16}\]  
When the state comes to \(s+1\), it indicates that the features of a new traffic category are added to the feature database; at this time, the feature database is updated to \(\mathcal{F}^{\prime}\), where the number of features changes to \(N^{\prime}\). After the feature library is updated, the features of the existing categories in the previous state may increase, so the hyperplane of the classifier needs to be adjusted. Moreover, a new classification plane should be added in order to learn the features of the new category. The weight vector and bias parameter of the hyperplanes in the state \(s+1\) are updated as given in Equations (17)-(20).  
\[w^{l}_{s+1}=w^{l}_{s}+\Delta w \tag{17}\]  
\[b^{l}_{s+1}=b^{l}_{s}+\Delta b \tag{18}\]  
\[w_{s+1}=[w^{1}_{s+1},w^{2}_{s+1},\ldots,w^{N}_{s+1}]\cup w^{N+1}_{s+1} \tag{19}\]  
\[b_{s+1}=[b^{1}_{s+1},b^{2}_{s+1},\ldots,b^{N}_{s+1}]\cup b^{N+1}_{s+1} \tag{20}\]  
In summary, the optimization function of the incremental multi-class SVM is improved, as shown in Equation (21), where \(\xi_{s+1}\) is the weight of the old classification plane, and \(\lambda_{s+1}\) is the knowledge weight of the old feature base. The classifier is able to learn new knowledge based on the classification of known types of traffic using the existing model.  
\[\min_{w,b,\sigma}W(w_{s+1},b_{s+1},e_{s+1}) \tag{21}\] \[= \frac{\sum_{l=1}^{N}\|w_{s+1}^{l}-w_{s}^{1}\|^{2}}{2}\] \[+\frac{\sum_{l=1}^{N}\|w_{s+1}^{N+1}-\xi_{s+1}w_{s}^{1}\|^{2}}{2}\] \[+\psi_{s+1}(\sum_{r=1}^{N^{\prime}}e_{s+1}^{rl})^{2}+\lambda_{s+1 }\sum_{i=1}^{N}(e_{s+1}^{rl})^{2})\]