encyclopegia.org

Support vector machine

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 \epsilon -sensitive.…

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 \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. 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) 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 \alpha_i of images of feature vectors x_i that occur in the data base. With this choice of a hyperplane, the points x in the feature space that are mapped into the hyperplane are defined by the relation \textstyle\sum_i \alpha_i k(x_i, x) = \text{constant}. Note that if k(x, y) becomes small as y grows further away from x , each term in the sum measures the degree of closeness of the test point x to the corresponding data base point 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 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. (\mathbf{x}_1, y_1), \ldots, (\mathbf{x}_n, y_n), where the y_i are either 1 or −1, each indicating the class to which the point \mathbf{x}_i belongs. Each \mathbf{x}_i is a p -dimensional real vector. We want to find the "maximum-margin hyperplane" that divides the group of points \mathbf{x}_i for which y_i = 1 from the group of points for which y_i = -1 , which is defined so that the distance between the hyperplane and the nearest point \mathbf{x}_i from either group is maximized. Any hyperplane can be written as the set of points \mathbf{x} satisfying \mathbf{w}^\mathsf{T} \mathbf{x} - b = 0, where \mathbf{w} is the (not necessarily normalized) normal vector to the hyperplane. This is much like Hesse normal form, except that \mathbf{w} is not necessarily a unit vector. The parameter \tfrac{b}{\|\mathbf{w}\|} determines the offset of the hyperplane from the origin along the normal vector \mathbf{w} . The bias may also be defined so that \mathbf{w}^\mathsf{T} \mathbf{x} + b = 0. \mathbf{w}^\mathsf{T} \mathbf{x} - b = 1 (anything on or above this boundary is of one class, with label 1) and \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 \tfrac{2}{\|\mathbf{w}\|} , so to maximize the distance between the planes we want to minimize \|\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 either \mathbf{w}^\mathsf{T} \mathbf{x}_i - b \ge 1 \, , \text{ if } y_i = 1, or \mathbf{w}^\mathsf{T} \mathbf{x}_i - b \le -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 We can put this together to get the optimization problem: \begin{align} &\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{align} The \mathbf{w} and b that solve this problem determine the final classifier, \mathbf{x} \mapsto \sgn(\mathbf{w}^\mathsf{T} \mathbf{x} - b) , where \sgn(\cdot) is the sign function. An important consequence of this geometric description is that the max-margin hyperplane is completely determined by those \mathbf{x}_i that lie nearest to it (explained below). These \mathbf{x}_i are called support vectors. \max\left(0, 1 - y_i(\mathbf{w}^\mathsf{T} \mathbf{x}_i - b)\right). Note that y_i is the i-th target (i.e., in this case, 1 or −1), and \mathbf{w}^\mathsf{T} \mathbf{x}_i - b is the i-th output. This function is zero if the constraint in is satisfied, in other words, if \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: \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 determines the trade-off between increasing the margin size and ensuring that the \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: \begin{align} &\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{align} Thus, for large values of 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. Polynomial (homogeneous): k(\mathbf{x}_i, \mathbf{x}_j) = (\mathbf{x}_i \cdot \mathbf{x}_j)^d . Particularly, when d = 1 , this becomes the linear kernel. Polynomial (inhomogeneous): k(\mathbf{x}_i, \mathbf{x}_j) = (\mathbf{x}_i \cdot \mathbf{x}_j + r)^d . Gaussian radial basis function: k(\mathbf{x}_i, \mathbf{x}_j) = \exp\left(-\gamma \left\|\mathbf{x}_i - \mathbf{x}_j\right\|^2\right) for \gamma > 0 . Sometimes parametrized using \gamma = 1/(2\sigma^2) . Sigmoid function (Hyperbolic tangent): k(\mathbf{x_i}, \mathbf{x_j}) = \tanh(\kappa \mathbf{x}_i \cdot \mathbf{x}_j + c) for some (not every) \kappa > 0 and c . The kernel is related to the transform \varphi(\mathbf{x}_i) by the equation k(\mathbf{x}_i, \mathbf{x}_j) = \varphi(\mathbf{x}_i) \cdot \varphi(\mathbf{x}_j) . The value is also in the transformed space, with \mathbf{w} = \sum_i \alpha_i y_i \varphi(\mathbf{x}_i) . Dot products with for classification can again be computed by the kernel trick, i.e. \mathbf{w} \cdot \varphi(\mathbf{x}) = \sum_i \alpha_i y_i k(\mathbf{x}_i, \mathbf{x}) . For each i \in \{1,\,\ldots,\,n\} we introduce a variable \zeta_i = \max\left(0, 1 - y_i(\mathbf{w}^\mathsf{T} \mathbf{x}_i - b)\right) . Note that \zeta_i is the smallest nonnegative number satisfying y_i(\mathbf{w}^\mathsf{T} \mathbf{x}_i - b) \geq 1 - \zeta_i. Thus we can rewrite the optimization problem as follows \begin{align} &\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{align} This is called the primal problem. \begin{align} &\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_iy_i = 0,\,\text{and } 0 \leq c_i \leq \frac{1}{2n\lambda}\;\text{for all }i. \end{align} This is called the dual problem. Since the dual maximization problem is a quadratic function of the c_i subject to linear constraints, it is efficiently solvable by quadratic programming algorithms. Here, the variables c_i are defined such that \mathbf{w} = \sum_{i=1}^n c_iy_i \mathbf{x}_i. Moreover, c_i = 0 exactly when \mathbf{x}_i lies on the correct side of the margin, and 0 when \mathbf{x}_i lies on the margin's boundary. It follows that \mathbf{w} can be written as a linear combination of the support vectors. The offset, b , can be recovered by finding an \mathbf{x}_i on the margin's boundary and solving 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 since 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 \varphi(\mathbf{x}_i). Moreover, we are given a kernel function k which satisfies k(\mathbf{x}_i, \mathbf{x}_j) = \varphi(\mathbf{x}_i) \cdot \varphi(\mathbf{x}_j) . We know the classification vector \mathbf{w} in the transformed space satisfies \mathbf{w} = \sum_{i=1}^n c_iy_i\varphi(\mathbf{x}_i), where, the c_i are obtained by solving the optimization problem \begin{align} \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_ic_i(\varphi(\mathbf{x}_i) \cdot \varphi(\mathbf{x}_j))y_jc_j \\ &= \sum_{i=1}^n c_i - \frac 1 2 \sum_{i=1}^n\sum_{j=1}^n y_ic_ik(\mathbf{x}_i, \mathbf{x}_j)y_jc_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{align} The coefficients c_i can be solved for using quadratic programming, as before. Again, we can find some index i such that 0 , so that \varphi(\mathbf{x}_i) lies on the boundary of the margin in the transformed space, and then solve \begin{align} b = \mathbf{w}^\mathsf{T} \varphi(\mathbf{x}_i) - y_i &= \left[\sum_{j=1}^n c_jy_j\varphi(\mathbf{x}_j) \cdot \varphi(\mathbf{x}_i)\right] - y_i \\ &= \left[\sum_{j=1}^n c_jy_jk(\mathbf{x}_j, \mathbf{x}_i)\right] - y_i. \end{align} Finally, \mathbf{z} \mapsto \sgn(\mathbf{w}^\mathsf{T} \varphi(\mathbf{z}) - b) = \sgn \left(\left[\sum_{i=1}^n c_iy_ik(\mathbf{x}_i, \mathbf{z})\right] - b\right). 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 is a convex function of \mathbf{w} and 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 , the number of data points. \begin{align} &\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_iy_i = 0,\,\text{and } 0 \leq c_i \leq \frac{1}{2n\lambda}\;\text{for all }i. \end{align} For each i \in \{1,\, \ldots,\, n\} , iteratively, the coefficient c_i is adjusted in the direction of \partial f/ \partial c_i . Then, the resulting vector of coefficients (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. \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} outright. In these cases, a common strategy is to choose the hypothesis that minimizes the empirical risk: \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 (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 grows large. This approach is called empirical risk minimization, or ERM. In order for the minimization problem to have a well-defined solution, we have to place constraints on the set \mathcal{H} of hypotheses being considered. If \mathcal{H} is a normed space (as is the case for SVM), a particularly effective technique is to consider only those hypotheses f for which \lVert f \rVert_{\mathcal H} . This is equivalent to imposing a regularization penalty \mathcal R(f) = \lambda_k\lVert f \rVert_{\mathcal H} , and solving the new optimization problem \hat f = \mathrm{arg}\min_{f \in \mathcal{H}} \hat \varepsilon(f) + \mathcal{R}(f). This approach is called Tikhonov regularization. More generally, \mathcal{R}(f) can be some measure of the complexity of the hypothesis f , so that simpler hypotheses are preferred. \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 \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, \ell_{sq}(y,z) = (y-z)^2 ; logistic regression employs the log-loss, \ell_{\log}(y,z) = \ln(1 + e^{-yz}). In particular, let y_x denote y conditional on the event that X = x . In the classification setting, we have: y_x = \begin{cases} 1 & \text{with probability } p_x \\ -1 & \text{with probability } 1-p_x \end{cases} The optimal classifier is therefore: 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_{sq}(x) = \mathbb{E}\left[y_x\right] ; For the logistic loss, it's the logit function, f_{\log}(x) = \ln\left(p_x / ({1-p_x})\right) . While both of these target functions yield the correct classifier, as \sgn(f_{sq}) = \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 . On the other hand, one can check that the target function for the hinge loss is exactly 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 \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. \mathcal{D}^\star = \{ \mathbf{x}^\star_i \mid \mathbf{x}^\star_i \in \mathbb{R}^p\}_{i=1}^k of test examples to be classified. Formally, a transductive support vector machine is defined by the following primal optimization problem: Minimize (in \mathbf{w}, b, \mathbf{y}^\star ) \frac{1}{2}\|\mathbf{w}\|^2 subject to (for any i = 1, \dots, n and any j = 1, \dots, k ) \begin{align} &y_i(\mathbf{w} \cdot \mathbf{x}_i - b) \ge 1, \\ &y^\star_j(\mathbf{w} \cdot \mathbf{x}^\star_j - b) \ge 1, \end{align} and y^\star_j \in \{-1, 1\}. Transductive support vector machines were introduced by Vladimir N. Vapnik in 1998. In 2011 it was shown by Polson and Scott that the SVM admits a Bayesian interpretation through the technique of data augmentation. In this approach the SVM is viewed as a graphical model (where the parameters are connected via probability distributions). This extended view allows the application of Bayesian techniques to SVMs, such as flexible feature modeling, automatic hyperparameter tuning, and predictive uncertainty quantification. In 2017, a scalable version of the Bayesian SVM was developed by Florian Wenzel, enabling the application of Bayesian SVMs to big data. Florian Wenzel developed two different versions, a variational inference (VI) scheme for the Bayesian kernel support vector machine (SVM) and a stochastic version (SVI) for the linear Bayesian SVM. Kernel SVMs are available in many machine-learning toolkits, including LIBSVM, MATLAB, SAS, SVMlight, kernlab, scikit-learn, Shogun, Weka, Shark, JKernelMachines, OpenCV and others. Preprocessing of data (standardization) is highly recommended to enhance accuracy of classification. There are a few methods of standardization, such as min-max, normalization by decimal scaling, Z-score. Subtraction of mean and division by variance of each feature is usually used for SVM.

References

No reference rows published for this article.

Cite this article

MLA

"Support vector machine." encyclopegia.org, 2026, https://encyclopegia.org/wiki/support-vector-machine. Accessed 24 November 2026.

Chicago

"Support vector machine." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/support-vector-machine.

APA

encyclopegia.org. (2026). Support vector machine. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/support-vector-machine

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Internet Archive Wayback Machine

article · references available

Template:Support

stub · references available

Joint Support and Enabling Service

stub · references available

automated teller machine

stub · references available

Z-machine

stub · references available

watch timing machine

stub · references available

vending machine

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1377218945 · 0.5 · snapshot enwiki-001377218945

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.