Regularization perspectives on support vector machines

From HandWiki
Revision as of 19:45, 6 February 2024 by BotanyGa (talk | contribs) (fixing)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Within mathematical analysis, Regularization perspectives on support-vector machines provide a way of interpreting support-vector machines (SVMs) in the context of other regularization-based machine-learning algorithms. SVM algorithms categorize binary data, with the goal of fitting the training set data in a way that minimizes the average of the hinge-loss function and L2 norm of the learned weights. This strategy avoids overfitting via Tikhonov regularization and in the L2 norm sense and also corresponds to minimizing the bias and variance of our estimator of the weights. Estimators with lower Mean squared error predict better or generalize better when given unseen data. Specifically, Tikhonov regularization algorithms produce a decision boundary that minimizes the average training-set error and constrain the Decision boundary not to be excessively complicated or overfit the training data via a L2 norm of the weights term. The training and test-set errors can be measured without bias and in a fair way using accuracy, precision, Auc-Roc, precision-recall, and other metrics.

Regularization perspectives on support-vector machines interpret SVM as a special case of Tikhonov regularization, specifically Tikhonov regularization with the hinge loss for a loss function. This provides a theoretical framework with which to analyze SVM algorithms and compare them to other algorithms with the same goals: to generalize without overfitting. SVM was first proposed in 1995 by Corinna Cortes and Vladimir Vapnik, and framed geometrically as a method for finding hyperplanes that can separate multidimensional data into two categories.[1] This traditional geometric interpretation of SVMs provides useful intuition about how SVMs work, but is difficult to relate to other machine-learning techniques for avoiding overfitting, like regularization, early stopping, sparsity and Bayesian inference. However, once it was discovered that SVM is also a special case of Tikhonov regularization, regularization perspectives on SVM provided the theory necessary to fit SVM within a broader class of algorithms.[2][3][4] This has enabled detailed comparisons between SVM and other forms of Tikhonov regularization, and theoretical grounding for why it is beneficial to use SVM's loss function, the hinge loss.[5]

Theoretical background

In the statistical learning theory framework, an algorithm is a strategy for choosing a function [math]\displaystyle{ f \colon \mathbf X \to \mathbf Y }[/math] given a training set [math]\displaystyle{ S = \{(x_1, y_1), \ldots, (x_n, y_n)\} }[/math] of inputs [math]\displaystyle{ x_i }[/math] and their labels [math]\displaystyle{ y_i }[/math] (the labels are usually [math]\displaystyle{ \pm1 }[/math]). Regularization strategies avoid overfitting by choosing a function that fits the data, but is not too complex. Specifically:

[math]\displaystyle{ f = \underset{f\in\mathcal{H}} \operatorname{argmin}\left\{\frac 1 n \sum_{i=1}^n V(y_i, f(x_i)) + \lambda\|f\|^2_\mathcal{H}\right\}, }[/math]

where [math]\displaystyle{ \mathcal{H} }[/math] is a hypothesis space[6] of functions, [math]\displaystyle{ V \colon \mathbf Y \times \mathbf Y \to \mathbb R }[/math] is the loss function, [math]\displaystyle{ \|\cdot\|_\mathcal H }[/math] is a norm on the hypothesis space of functions, and [math]\displaystyle{ \lambda \in \mathbb R }[/math] is the regularization parameter.[7]

When [math]\displaystyle{ \mathcal{H} }[/math] is a reproducing kernel Hilbert space, there exists a kernel function [math]\displaystyle{ K \colon \mathbf X \times \mathbf X \to \mathbb R }[/math] that can be written as an [math]\displaystyle{ n \times n }[/math] symmetric positive-definite matrix [math]\displaystyle{ \mathbf K }[/math]. By the representer theorem,[8]

[math]\displaystyle{ f(x_i) = \sum_{j=1}^n c_j \mathbf K_{ij}, \text{ and } \|f\|^2_{\mathcal H} = \langle f, f\rangle_\mathcal H = \sum_{i=1}^n \sum_{j=1}^n c_i c_jK(x_i, x_j) = c^T \mathbf K c. }[/math]

Special properties of the hinge loss

Hinge and misclassification loss functions

The simplest and most intuitive loss function for categorization is the misclassification loss, or 0–1 loss, which is 0 if [math]\displaystyle{ f(x_i) = y_i }[/math] and 1 if [math]\displaystyle{ f(x_i) \neq y_i }[/math], i.e. the Heaviside step function on [math]\displaystyle{ -y_if(x_i) }[/math]. However, this loss function is not convex, which makes the regularization problem very difficult to minimize computationally. Therefore, we look for convex substitutes for the 0–1 loss. The hinge loss, [math]\displaystyle{ V\big(y_i, f(x_i)\big) = \big(1 - yf(x)\big)_+ }[/math], where [math]\displaystyle{ (s)_+ = \max(s, 0) }[/math], provides such a convex relaxation. In fact, the hinge loss is the tightest convex upper bound to the 0–1 misclassification loss function,[4] and with infinite data returns the Bayes-optimal solution:[5][9]

[math]\displaystyle{ f_b(x) = \begin{cases} 1, & p(1\mid x) \gt p(-1\mid x), \\ -1, & p(1\mid x) \lt p(-1\mid x). \end{cases} }[/math]

Derivation

The Tikhonov regularization problem can be shown to be equivalent to traditional formulations of SVM by expressing it in terms of the hinge loss.[10] With the hinge loss

[math]\displaystyle{ V\big(y_i, f(x_i)\big) = \big(1 - yf(x)\big)_+, }[/math]

where [math]\displaystyle{ (s)_+ = \max(s, 0) }[/math], the regularization problem becomes

[math]\displaystyle{ f = \underset{f\in\mathcal{H}} \operatorname{argmin} \left\{\frac 1 n \sum_{i=1}^n \big(1 - yf(x)\big)_+ + \lambda\|f\|^2_\mathcal{H}\right\}. }[/math]

Multiplying by [math]\displaystyle{ 1/(2\lambda) }[/math] yields

[math]\displaystyle{ f = \underset{f\in\mathcal{H}} \operatorname{argmin} \left\{C\sum_{i=1}^n \big(1 - yf(x)\big)_+ + \frac{1}{2}\|f\|^2_\mathcal{H}\right\} }[/math]

with [math]\displaystyle{ C = 1/(2\lambda n) }[/math], which is equivalent to the standard SVM minimization problem.

Notes and references

  1. Cortes, Corinna; Vladimir Vapnik (1995). "Support-Vector Networks". Machine Learning 20 (3): 273–297. doi:10.1007/BF00994018. 
  2. Rosasco, Lorenzo. "Regularized Least-Squares and Support Vector Machines". https://www.mit.edu/~9.520/spring12/slides/class06/class06_RLSSVM.pdf. 
  3. Rifkin, Ryan (2002). Everything Old is New Again: A Fresh Look at Historical Approaches in Machine Learning. MIT (PhD thesis). http://web.mit.edu/~9.520/www/Papers/thesis-rifkin.pdf. 
  4. 4.0 4.1 Lee, Yoonkyung; Wahba, Grace (2012). "Multicategory Support Vector Machines". Journal of the American Statistical Association 99 (465): 67–81. doi:10.1198/016214504000000098. 
  5. 5.0 5.1 Rosasco L.; De Vito E.; Caponnetto A.; Piana M.; Verri A. (May 2004). "Are Loss Functions All the Same". Neural Computation. 5 16 (5): 1063–1076. doi:10.1162/089976604773135104. PMID 15070510. 
  6. A hypothesis space is the set of functions used to model the data in a machine-learning problem. Each function corresponds to a hypothesis about the structure of the data. Typically the functions in a hypothesis space form a Hilbert space of functions with norm formed from the loss function.
  7. For insight on choosing the parameter, see, e.g., Wahba, Grace; Yonghua Wang (1990). "When is the optimal regularization parameter insensitive to the choice of the loss function". Communications in Statistics – Theory and Methods 19 (5): 1685–1700. doi:10.1080/03610929008830285. 
  8. See Scholkopf, Bernhard; Ralf Herbrich; Alex Smola (2001). "A Generalized Representer Theorem". Computational Learning Theory. Lecture Notes in Computer Science. 2111. 416–426. doi:10.1007/3-540-44581-1_27. ISBN 978-3-540-42343-0. 
  9. Lin, Yi (July 2002). "Support Vector Machines and the Bayes Rule in Classification". Data Mining and Knowledge Discovery 6 (3): 259–275. doi:10.1023/A:1015469627679. http://cbio.ensmp.fr/~jvert/svn/bibli/local/Lin2002Support.pdf. 
  10. For a detailed derivation, see Rifkin, Ryan (2002). Everything Old is New Again: A Fresh Look at Historical Approaches in Machine Learning. MIT (PhD thesis). http://web.mit.edu/~9.520/www/Papers/thesis-rifkin.pdf.