Complete Technical Paper Content β Ai Interior Design
1. Executive Abstract, Problem Formulation & Background
In machine learning, a support vector machine (SVM) or support vector network is a supervised max-margin model with associated learning algorithms that analyze data for classification and regression analysis. Developed at AT&T Bell Laboratories, SVMs are one of the most studied models, being based on statistical learning frameworks of VC theory proposed by Vapnik (1982, 1995) and Chervonenkis (1974). In addition to performing linear classification, SVMs can efficiently perform non-linear classification using the kernel trick, representing the data only through a set of pairwise similarity comparisons between the original data points using a kernel function, thereby transforming them into coordinates in a higher-dimensional feature space. Thus, SVMs use the kernel trick to implicitly map their inputs into high-dimensional feature spaces, where linear classification can be performed. Furthermore, the computational complexity arising from using the kernel trick warrants lesser usage of resources. As members of the max-margin models, SVMs are resilient to noisy data (e.g., misclassified examples). They can also be used for regression tasks, where the objective becomes Ο΅ {\displaystyle \epsilon } -sensitive. The support vector clustering algorithm, created by Hava Siegelmann and Vladimir Vapnik, applies the statistics of support vectors, developed in the support vector machines algorithm, to categorize unlabelled data. These data sets require unsupervised learning approaches, which attempt to find natural clustering of the data into groups, and then to map new data according to these clusters. The popularity of SVMs is likely due to their amenability to theoretical analysis and their flexibility in being applied to a wide variety of tasks, including structured prediction problems. It is not clear that SVMs have better predictive performance than other linear models, such as logistic regression and linear regression.
Classifying data is a common task in machine learning. Say we have a binary classification problem: suppose some given data points each belong to one of two classes, and the goal is to decide which class a new data point will be in. In the case of support vector machines, a data point is viewed as a p {\displaystyle p} -dimensional vector (a list of p {\displaystyle p} numbers), and we want to know whether we can separate such points with a ( p β 1 ) {\displaystyle (p-1)} -dimensional hyperplane. This is called a linear classifier. There are many hyperplanes that might classify the data. One reasonable choice as the best hyperplane is the one that represents the largest separation, or margin, between the two classes. Therefore, we choose a hyperplane such that its distance from the data points nearest to it on each side is maximized. If such a hyperplane exists, it is known as the maximum-margin hyperplane and the linear classifier it defines is known as a maximum-margin classifier; or equivalently, the perceptron of optimal stability. More formally, a support vector machine constructs a hyperplane or set of hyperplanes in a high or infinite-dimensional space, which can be used for classification, regression, or other tasks like outlier detection. Intuitively, a good separation is achieved by the hyperplane that has the largest distance to the nearest training-data point of any class (so-called functional margin), since in general the larger the margin, the lower the generalization error of the classifier. A lower generalization error means that the implementer is less likely to experience overfitting. Whereas the original problem may be stated in a finite-dimensional space, it often happens that the sets to discriminate are not linearly separable in that space. For this reason, it was proposed that the original finite-dimensional space be mapped into a much higher-dimensional space, presumably making the separation easier in that space. To keep the computational load reasonable, the mappings used by SVM schemes are designed to ensure that dot products of pairs of input data vectors may be computed easily in terms of the variables in the original space, by defining them in terms of a kernel function k ( x , y ) {\displaystyle k(x,y)} selected to suit the problem. The hyperplanes in the higher-dimensional space are defined as the set of points whose dot product with a vector in that space is constant, where such a set of vectors is an orthogonal (and thus minimal) set of vectors that defines a hyperplane. The vectors defining the hyperplanes can be chosen to be linear combinations with parameters Ξ± i {\displaystyle \alpha _{i}} of images of feature vectors x i {\displaystyle x_{i}} that occur in the data base. With this choice of a hyperplane, the points x {\displaystyle x} in the feature space that are mapped into the hyperplane are defined by the relation β i Ξ± i k ( x i , x ) = constant . {\displaystyle \textstyle \sum _{i}\alpha _{i}k(x_{i},x)={\text{constant}}.} Note that if k ( x , y ) {\displaystyle k(x,y)} becomes small as y {\displaystyle y} grows further away from x {\displaystyle x} , each term in the sum measures the degree of closeness of the test point x {\displaystyle x} to the corresponding data base point x i {\displaystyle x_{i}} . In this way, the sum of kernels above can be used to measure the relative nearness of each test point to the data points originating in one or the other of the sets to be discriminated. Note the fact that the set of points x {\displaystyle x} mapped into any hyperplane can be quite convoluted as a result, allowing much more complex discrimination between sets that are not convex at all in the original space.
SVMs are helpful in text and hypertext categorization, as their application can significantly reduce the need for labeled training instances in both the standard inductive and transductive settings. Some methods for shallow semantic parsing are based on support vector machines. Classification of images can also be performed using SVMs. Experimental results show that SVMs achieve significantly higher search accuracy than traditional query refinement schemes after just three to four rounds of relevance feedback. This is also true for image segmentation systems, including those using a modified version SVM that uses the privileged approach as suggested by Vapnik. Classification of satellite data like SAR data using supervised SVM. Hand-written characters can be recognized using SVM. The SVM algorithm has been widely applied in the biological and other sciences. They have been used to classify proteins with up to 90% of the compounds classified correctly. Permutation tests based on SVM weights have been suggested as a mechanism for interpretation of SVM models. Support vector machine weights have also been used to interpret SVM models in the past. Posthoc interpretation of support vector machine models in order to identify features used by the model to make predictions is a relatively new area of research with special significance in the biological sciences.
We are given a training dataset of n {\displaystyle n} points of the form
( x 1 , y 1 ) , β¦ , ( x n , y n ) , {\displaystyle (\mathbf {x} _{1},y_{1}),\ldots ,(\mathbf {x} _{n},y_{n}),}
where the y i {\displaystyle y_{i}} are either 1 or β1, each indicating the class to which the point x i {\displaystyle \mathbf {x} _{i}} belongs. Each x i {\displaystyle \mathbf {x} _{i}} is a p {\displaystyle p} -dimensional real vector. We want to find the "maximum-margin hyperplane" that divides the group of points x i {\displaystyle \mathbf {x} _{i}} for which y i = 1 {\displaystyle y_{i}=1} from the group of points for which y i = β 1 {\displaystyle y_{i}=-1} , which is defined so that the distance between the hyperplane and the nearest point x i {\displaystyle \mathbf {x} _{i}} from either group is maximized. Any hyperplane can be written as the set of points x {\displaystyle \mathbf {x} } satisfying w T x β b = 0 , {\displaystyle \mathbf {w} ^{\mathsf {T}}\mathbf {x} -b=0,} where w {\displaystyle \mathbf {w} } is the (not necessarily normalized) normal vector to the hyperplane. This is much like Hesse normal form, except that w {\displaystyle \mathbf {w} } is not necessarily a unit vector. The parameter b β w β {\displaystyle {\tfrac {b}{\|\mathbf {w} \|}}} determines the offset of the hyperplane from the origin along the normal vector w {\displaystyle \mathbf {w} } . The bias may also be defined so that w T x + b = 0. {\displaystyle \mathbf {w} ^{\mathsf {T}}\mathbf {x} +b=0.}
w T x β b = 1 {\displaystyle \mathbf {w} ^{\mathsf {T}}\mathbf {x} -b=1} (anything on or above this boundary is of one class, with label 1) and
w T x β b = β 1 {\displaystyle \mathbf {w} ^{\mathsf {T}}\mathbf {x} -b=-1} (anything on or below this boundary is of the other class, with label β1). Geometrically, the distance between these two hyperplanes is 2 β w β {\displaystyle {\tfrac {2}{\|\mathbf {w} \|}}} , so to maximize the distance between the planes we want to minimize β w β {\displaystyle \|\mathbf {w} \|} . The distance is computed using the distance from a point to a plane equation. We also have to prevent data points from falling into the margin, we add the following constraint: for each i {\displaystyle i} either
w T x i β b β₯ 1 , if y i = 1 , {\displaystyle \mathbf {w} ^{\mathsf {T}}\mathbf {x} _{i}-b\geq 1\,,{\text{ if }}y_{i}=1,}
w T x i β b β€ β 1 , if y i = β 1. {\displaystyle \mathbf {w} ^{\mathsf {T}}\mathbf {x} _{i}-b\leq -1\,,{\text{ if }}y_{i}=-1.}
These constraints state that each data point must lie on the correct side of the margin. This can be rewritten as
2. Related Work, Literature Survey & Algorithmic Foundations
minimize w , b 1 2 β w β 2 subject to y i ( w β€ x i β b ) β₯ 1 β i β { 1 , β¦ , n } {\displaystyle {\begin{aligned}&{\underset {\mathbf {w} ,\;b}{\operatorname {minimize} }}&&{\frac {1}{2}}\|\mathbf {w} \|^{2}\\&{\text{subject to}}&&y_{i}(\mathbf {w} ^{\top }\mathbf {x} _{i}-b)\geq 1\quad \forall i\in \{1,\dots ,n\}\end{aligned}}}
The w {\displaystyle \mathbf {w} } and b {\displaystyle b} that solve this problem determine the final classifier, x β¦ sgn β‘ ( w T x β b ) {\displaystyle \mathbf {x} \mapsto \operatorname {sgn}(\mathbf {w} ^{\mathsf {T}}\mathbf {x} -b)} , where sgn β‘ ( β ) {\displaystyle \operatorname {sgn}(\cdot )} is the sign function. An important consequence of this geometric description is that the max-margin hyperplane is completely determined by those x i {\displaystyle \mathbf {x} _{i}} that lie nearest to it (explained below). These x i {\displaystyle \mathbf {x} _{i}} are called support vectors.
max ( 0 , 1 β y i ( w T x i β b ) ) . {\displaystyle \max \left(0,1-y_{i}(\mathbf {w} ^{\mathsf {T}}\mathbf {x} _{i}-b)\right).}
Note that y i {\displaystyle y_{i}} is the i-th target (i.e., in this case, 1 or β1), and w T x i β b {\displaystyle \mathbf {w} ^{\mathsf {T}}\mathbf {x} _{i}-b} is the i-th output. This function is zero if the constraint in (1) is satisfied, in other words, if x i {\displaystyle \mathbf {x} _{i}} lies on the correct side of the margin. For data on the wrong side of the margin, the function's value is proportional to the distance from the margin. The goal of the optimization then is to minimize:
β w β 2 + C [ 1 n β i = 1 n max ( 0 , 1 β y i ( w T x i β b ) ) ] , {\displaystyle \lVert \mathbf {w} \rVert ^{2}+C\left[{\frac {1}{n}}\sum _{i=1}^{n}\max \left(0,1-y_{i}(\mathbf {w} ^{\mathsf {T}}\mathbf {x} _{i}-b)\right)\right],}
where the parameter C > 0 {\displaystyle C>0} determines the trade-off between increasing the margin size and ensuring that the x i {\displaystyle \mathbf {x} _{i}} lie on the correct side of the margin (Note we can add a weight to either term in the equation above). By deconstructing the hinge loss, this optimization problem can be formulated into the following:
minimize w , b , ΞΆ β w β 2 2 + C β i = 1 n ΞΆ i subject to y i ( w β€ x i β b ) β₯ 1 β ΞΆ i , ΞΆ i β₯ 0 β i β { 1 , β¦ , n } {\displaystyle {\begin{aligned}&{\underset {\mathbf {w} ,\;b,\;\mathbf {\zeta } }{\operatorname {minimize} }}&&\|\mathbf {w} \|_{2}^{2}+C\sum _{i=1}^{n}\zeta _{i}\\&{\text{subject to}}&&y_{i}(\mathbf {w} ^{\top }\mathbf {x} _{i}-b)\geq 1-\zeta _{i},\quad \zeta _{i}\geq 0\quad \forall i\in \{1,\dots ,n\}\end{aligned}}}
Thus, for large values of C {\displaystyle C} , it will behave similar to the hard-margin SVM, if the input data are linearly classifiable, but will still learn if a classification rule is viable or not.
The original maximum-margin hyperplane algorithm proposed by Vapnik in 1963 constructed a linear classifier. However, in 1992, Bernhard Boser, Isabelle Guyon and Vladimir Vapnik suggested a way to create nonlinear classifiers by applying the kernel trick (originally proposed by Aizerman et al.) to maximum-margin hyperplanes. The kernel trick, where dot products are replaced by kernels, is easily derived in the dual representation of the SVM problem. This allows the algorithm to fit the maximum-margin hyperplane in a transformed feature space. The transformation may be nonlinear and the transformed space high-dimensional; although the classifier is a hyperplane in the transformed feature space, it may be nonlinear in the original input space. It is noteworthy that working in a higher-dimensional feature space increases the generalization error of support vector machines, although given enough samples the algorithm still performs well. Some common kernels include:
Polynomial (homogeneous): k ( x i , x j ) = ( x i β x j ) d {\displaystyle k(\mathbf {x} _{i},\mathbf {x} _{j})=(\mathbf {x} _{i}\cdot \mathbf {x} _{j})^{d}} . Particularly, when d = 1 {\displaystyle d=1} , this becomes the linear kernel. Polynomial (inhomogeneous): k ( x i , x j ) = ( x i β x j + r ) d {\displaystyle k(\mathbf {x} _{i},\mathbf {x} _{j})=(\mathbf {x} _{i}\cdot \mathbf {x} _{j}+r)^{d}} . Gaussian radial basis function: k ( x i , x j ) = exp β‘ ( β Ξ³ β x i β x j β 2 ) {\displaystyle k(\mathbf {x} _{i},\mathbf {x} _{j})=\exp \left(-\gamma \left\|\mathbf {x} _{i}-\mathbf {x} _{j}\right\|^{2}\right)} for Ξ³ > 0 {\displaystyle \gamma >0} . Sometimes parametrized using Ξ³ = 1 / ( 2 Ο 2 ) {\displaystyle \gamma =1/(2\sigma ^{2})} . Sigmoid function (Hyperbolic tangent): k ( x i , x j ) = tanh β‘ ( ΞΊ x i β x j + c ) {\displaystyle k(\mathbf {x_{i}} ,\mathbf {x_{j}} )=\tanh(\kappa \mathbf {x} _{i}\cdot \mathbf {x} _{j}+c)} for some (not every) ΞΊ > 0 {\displaystyle \kappa >0} and c < 0 {\displaystyle c<0} . The kernel is related to the transform Ο ( x i ) {\displaystyle \varphi (\mathbf {x} _{i})} by the equation k ( x i , x j ) = Ο ( x i ) β Ο ( x j ) {\displaystyle k(\mathbf {x} _{i},\mathbf {x} _{j})=\varphi (\mathbf {x} _{i})\cdot \varphi (\mathbf {x} _{j})} . The value w is also in the transformed space, with w = β i Ξ± i y i Ο ( x i ) {\textstyle \mathbf {w} =\sum _{i}\alpha _{i}y_{i}\varphi (\mathbf {x} _{i})} . Dot products with w for classification can again be computed by the kernel trick, i.e. w β Ο ( x ) = β i Ξ± i y i k ( x i , x ) {\textstyle \mathbf {w} \cdot \varphi (\mathbf {x} )=\sum _{i}\alpha _{i}y_{i}k(\mathbf {x} _{i},\mathbf {x} )} .
We focus on the soft-margin classifier since, as noted above, choosing a sufficiently small value for Ξ» {\displaystyle \lambda } yields the hard-margin classifier for linearly classifiable input data. The classical approach, which involves reducing (2) to a quadratic programming problem, is detailed below. Then, more recent approaches such as sub-gradient descent and coordinate descent will be discussed.
3. Dataset Ingestion, Preprocessing & Stochastic Augmentations
minimize 1 n β i = 1 n ΞΆ i + Ξ» β w β 2 subject to y i ( w T x i β b ) β₯ 1 β ΞΆ i and ΞΆ i β₯ 0 , for all i . {\displaystyle {\begin{aligned}&{\text{minimize }}{\frac {1}{n}}\sum _{i=1}^{n}\zeta _{i}+\lambda \|\mathbf {w} \|^{2}\\[0.5ex]&{\text{subject to }}y_{i}\left(\mathbf {w} ^{\mathsf {T}}\mathbf {x} _{i}-b\right)\geq 1-\zeta _{i}\,{\text{ and }}\,\zeta _{i}\geq 0,\,{\text{for all }}i.\end{aligned}}}
maximize f ( c 1 β¦ c n ) = β i = 1 n c i β 1 2 β i = 1 n β j = 1 n y i c i ( x i T x j ) y j c j , subject to β i = 1 n c i y i = 0 , and 0 β€ c i β€ 1 2 n Ξ» for all i . {\displaystyle {\begin{aligned}&{\text{maximize}}\,\,f(c_{1}\ldots c_{n})=\sum _{i=1}^{n}c_{i}-{\frac {1}{2}}\sum _{i=1}^{n}\sum _{j=1}^{n}y_{i}c_{i}(\mathbf {x} _{i}^{\mathsf {T}}\mathbf {x} _{j})y_{j}c_{j},\\&{\text{subject to }}\sum _{i=1}^{n}c_{i}y_{i}=0,\,{\text{and }}0\leq c_{i}\leq {\frac {1}{2n\lambda }}\;{\text{for all }}i.\end{aligned}}}
This is called the dual problem. Since the dual maximization problem is a quadratic function of the c i {\displaystyle c_{i}} subject to linear constraints, it is efficiently solvable by quadratic programming algorithms. Here, the variables c i {\displaystyle c_{i}} are defined such that
w = β i = 1 n c i y i x i . {\displaystyle \mathbf {w} =\sum _{i=1}^{n}c_{i}y_{i}\mathbf {x} _{i}.}
Moreover, c i = 0 {\displaystyle c_{i}=0} exactly when x i {\displaystyle \mathbf {x} _{i}} lies on the correct side of the margin, and 0 < c i < ( 2 n Ξ» ) β 1 {\displaystyle 0<c_{i}<(2n\lambda )^{-1}} when x i {\displaystyle \mathbf {x} _{i}} lies on the margin's boundary. It follows that w {\displaystyle \mathbf {w} } can be written as a linear combination of the support vectors. The offset, b {\displaystyle b} , can be recovered by finding an x i {\displaystyle \mathbf {x} _{i}} on the margin's boundary and solving
y i ( w T x i β b ) = 1 βΊ b = w T x i β y i . {\displaystyle y_{i}(\mathbf {w} ^{\mathsf {T}}\mathbf {x} _{i}-b)=1\iff b=\mathbf {w} ^{\mathsf {T}}\mathbf {x} _{i}-y_{i}.}
(Note that y i β 1 = y i {\displaystyle y_{i}^{-1}=y_{i}} since y i = Β± 1 {\displaystyle y_{i}=\pm 1} .)
Suppose now that we would like to learn a nonlinear classification rule which corresponds to a linear classification rule for the transformed data points Ο ( x i ) . {\displaystyle \varphi (\mathbf {x} _{i}).} Moreover, we are given a kernel function k {\displaystyle k} which satisfies k ( x i , x j ) = Ο ( x i ) β Ο ( x j ) {\displaystyle k(\mathbf {x} _{i},\mathbf {x} _{j})=\varphi (\mathbf {x} _{i})\cdot \varphi (\mathbf {x} _{j})} . We know the classification vector w {\displaystyle \mathbf {w} } in the transformed space satisfies
w = β i = 1 n c i y i Ο ( x i ) , {\displaystyle \mathbf {w} =\sum _{i=1}^{n}c_{i}y_{i}\varphi (\mathbf {x} _{i}),}
where, the c i {\displaystyle c_{i}} are obtained by solving the optimization problem
maximize f ( c 1 β¦ c n ) = β i = 1 n c i β 1 2 β i = 1 n β j = 1 n y i c i ( Ο ( x i ) β Ο ( x j ) ) y j c j = β i = 1 n c i β 1 2 β i = 1 n β j = 1 n y i c i k ( x i , x j ) y j c j subject to β i = 1 n c i y i = 0 , and 0 β€ c i β€ 1 2 n Ξ» for all i . {\displaystyle {\begin{aligned}{\text{maximize}}\,\,f(c_{1}\ldots c_{n})&=\sum _{i=1}^{n}c_{i}-{\frac {1}{2}}\sum _{i=1}^{n}\sum _{j=1}^{n}y_{i}c_{i}(\varphi (\mathbf {x} _{i})\cdot \varphi (\mathbf {x} _{j}))y_{j}c_{j}\\&=\sum _{i=1}^{n}c_{i}-{\frac {1}{2}}\sum _{i=1}^{n}\sum _{j=1}^{n}y_{i}c_{i}k(\mathbf {x} _{i},\mathbf {x} _{j})y_{j}c_{j}\\{\text{subject to }}\sum _{i=1}^{n}c_{i}y_{i}&=0,\,{\text{and }}0\leq c_{i}\leq {\frac {1}{2n\lambda }}\;{\text{for all }}i.\end{aligned}}}
4. Neural Network Backbone, Layer Specifications & Loss Formulations
The coefficients c i {\displaystyle c_{i}} can be solved for using quadratic programming, as before. Again, we can find some index i {\displaystyle i} such that 0 < c i < ( 2 n Ξ» ) β 1 {\displaystyle 0<c_{i}<(2n\lambda )^{-1}} , so that Ο ( x i ) {\displaystyle \varphi (\mathbf {x} _{i})} lies on the boundary of the margin in the transformed space, and then solve
b = w T Ο ( x i ) β y i = [ β j = 1 n c j y j Ο ( x j ) β Ο ( x i ) ] β y i = [ β j = 1 n c j y j k ( x j , x i ) ] β y i . {\displaystyle {\begin{aligned}b=\mathbf {w} ^{\mathsf {T}}\varphi (\mathbf {x} _{i})-y_{i}&=\left[\sum _{j=1}^{n}c_{j}y_{j}\varphi (\mathbf {x} _{j})\cdot \varphi (\mathbf {x} _{i})\right]-y_{i}\\&=\left[\sum _{j=1}^{n}c_{j}y_{j}k(\mathbf {x} _{j},\mathbf {x} _{i})\right]-y_{i}.\end{aligned}}}
z β¦ sgn β‘ ( w T Ο ( z ) β b ) = sgn β‘ ( [ β i = 1 n c i y i k ( x i , z ) ] β b ) . {\displaystyle \mathbf {z} \mapsto \operatorname {sgn}(\mathbf {w} ^{\mathsf {T}}\varphi (\mathbf {z} )-b)=\operatorname {sgn} \left(\left[\sum _{i=1}^{n}c_{i}y_{i}k(\mathbf {x} _{i},\mathbf {z} )\right]-b\right).}
f ( w , b ) = [ 1 n β i = 1 n max ( 0 , 1 β y i ( w T x i β b ) ) ] + Ξ» β w β 2 . {\displaystyle f(\mathbf {w} ,b)=\left[{\frac {1}{n}}\sum _{i=1}^{n}\max \left(0,1-y_{i}(\mathbf {w} ^{\mathsf {T}}\mathbf {x} _{i}-b)\right)\right]+\lambda \|\mathbf {w} \|^{2}.}
Note that f {\displaystyle f} is a convex function of w {\displaystyle \mathbf {w} } and b {\displaystyle b} . As such, traditional gradient descent (or SGD) methods can be adapted, where instead of taking a step in the direction of the function's gradient, a step is taken in the direction of a vector selected from the function's sub-gradient. This approach has the advantage that, for certain implementations, the number of iterations does not scale with n {\displaystyle n} , the number of data points.
maximize f ( c 1 β¦ c n ) = β i = 1 n c i β 1 2 β i = 1 n β j = 1 n y i c i ( x i β x j ) y j c j , subject to β i = 1 n c i y i = 0 , and 0 β€ c i β€ 1 2 n Ξ» for all i . {\displaystyle {\begin{aligned}&{\text{maximize}}\,\,f(c_{1}\ldots c_{n})=\sum _{i=1}^{n}c_{i}-{\frac {1}{2}}\sum _{i=1}^{n}\sum _{j=1}^{n}y_{i}c_{i}(x_{i}\cdot x_{j})y_{j}c_{j},\\&{\text{subject to }}\sum _{i=1}^{n}c_{i}y_{i}=0,\,{\text{and }}0\leq c_{i}\leq {\frac {1}{2n\lambda }}\;{\text{for all }}i.\end{aligned}}}
For each i β { 1 , β¦ , n } {\displaystyle i\in \{1,\,\ldots ,\,n\}} , iteratively, the coefficient c i {\displaystyle c_{i}} is adjusted in the direction of β f / β c i {\displaystyle \partial f/\partial c_{i}} . Then, the resulting vector of coefficients ( c 1 β² , β¦ , c n β² ) {\displaystyle (c_{1}',\,\ldots ,\,c_{n}')} is projected onto the nearest vector of coefficients that satisfies the given constraints. (Typically Euclidean distances are used.) The process is then repeated until a near-optimal vector of coefficients is obtained. The resulting algorithm is extremely fast in practice, although few performance guarantees have been proven.
Ξ΅ ( f ) = E [ β ( y n + 1 , f ( X n + 1 ) ) ] . {\displaystyle \varepsilon (f)=\mathbb {E} \left[\ell (y_{n+1},f(X_{n+1}))\right].}
In most cases, we don't know the joint distribution of X n + 1 , y n + 1 {\displaystyle X_{n+1},\,y_{n+1}} outright. In these cases, a common strategy is to choose the hypothesis that minimizes the empirical risk:
Ξ΅ ^ ( f ) = 1 n β k = 1 n β ( y k , f ( X k ) ) . {\displaystyle {\hat {\varepsilon }}(f)={\frac {1}{n}}\sum _{k=1}^{n}\ell (y_{k},f(X_{k})).}
Under certain assumptions about the sequence of random variables X k , y k {\displaystyle X_{k},\,y_{k}} (for example, that they are generated by a finite Markov process), if the set of hypotheses being considered is small enough, the minimizer of the empirical risk will closely approximate the minimizer of the expected risk as n {\displaystyle n} grows large. This approach is called empirical risk minimization, or ERM.
5. Training Protocol, Convergence Behavior & Experimental Evaluation
f ^ = a r g min f β H Ξ΅ ^ ( f ) + R ( f ) . {\displaystyle {\hat {f}}=\mathrm {arg} \min _{f\in {\mathcal {H}}}{\hat {\varepsilon }}(f)+{\mathcal {R}}(f).}
This approach is called Tikhonov regularization. More generally, R ( f ) {\displaystyle {\mathcal {R}}(f)} can be some measure of the complexity of the hypothesis f {\displaystyle f} , so that simpler hypotheses are preferred.
[ 1 n β i = 1 n max ( 0 , 1 β y i ( w T x β b ) ) ] + Ξ» β w β 2 . {\displaystyle \left[{\frac {1}{n}}\sum _{i=1}^{n}\max \left(0,1-y_{i}(\mathbf {w} ^{\mathsf {T}}\mathbf {x} -b)\right)\right]+\lambda \|\mathbf {w} \|^{2}.}
In light of the above discussion, we see that the SVM technique is equivalent to empirical risk minimization with Tikhonov regularization, where in this case the loss function is the hinge loss
β ( y , z ) = max ( 0 , 1 β y z ) . {\displaystyle \ell (y,z)=\max \left(0,1-yz\right).}
From this perspective, SVM is closely related to other fundamental classification algorithms such as regularized least-squares and logistic regression. The difference between the three lies in the choice of loss function: regularized least-squares amounts to empirical risk minimization with the square-loss, β s q ( y , z ) = ( y β z ) 2 {\displaystyle \ell _{sq}(y,z)=(y-z)^{2}} ; logistic regression employs the log-loss,
β log ( y , z ) = ln β‘ ( 1 + e β y z ) . {\displaystyle \ell _{\log }(y,z)=\ln(1+e^{-yz}).}
y x = { 1 with probability p x β 1 with probability 1 β p x {\displaystyle y_{x}={\begin{cases}1&{\text{with probability }}p_{x}\\-1&{\text{with probability }}1-p_{x}\end{cases}}}
f β ( x ) = { 1 if p x β₯ 1 / 2 β 1 otherwise {\displaystyle f^{*}(x)={\begin{cases}1&{\text{if }}p_{x}\geq 1/2\\-1&{\text{otherwise}}\end{cases}}}
For the square-loss, the target function is the conditional expectation function, f s q ( x ) = E [ y x ] {\displaystyle f_{sq}(x)=\mathbb {E} \left[y_{x}\right]} ; For the logistic loss, it's the logit function, f log ( x ) = ln β‘ ( p x / ( 1 β p x ) ) {\displaystyle f_{\log }(x)=\ln \left(p_{x}/({1-p_{x}})\right)} . While both of these target functions yield the correct classifier, as sgn β‘ ( f s q ) = sgn β‘ ( f log ) = f β {\displaystyle \operatorname {sgn}(f_{sq})=\operatorname {sgn}(f_{\log })=f^{*}} , they give us more information than we need. In fact, they give us enough information to completely describe the distribution of y x {\displaystyle y_{x}} . On the other hand, one can check that the target function for the hinge loss is exactly f β {\displaystyle f^{*}} . Thus, in a sufficiently rich hypothesis spaceβor equivalently, for an appropriately chosen kernelβthe SVM classifier will converge to the simplest function (in terms of R {\displaystyle {\mathcal {R}}} ) that correctly classifies the data. This extends the geometric interpretation of SVMβfor linear classification, the empirical risk is minimized by any function whose margins lie between the support vectors, and the simplest of these is the max-margin classifier.
Requires full labeling of input data Uncalibrated class membership probabilitiesβSVM stems from Vapnik's theory which avoids estimating probabilities on finite data The SVM is only directly applicable for two-class tasks. Therefore, algorithms that reduce the multi-class task to several binary problems have to be applied; see the multi-class SVM section. Parameters of a solved model are difficult to interpret.
Model Figures & Evaluation Curves (4 Images)
Deep Learning Execution Pipeline
(Preprocessing)
(Feature Extraction)
(Self-Attention)
(Loss Optimization)