SVDD Procedure

Mathematical Formulation

This section describes the mathematical formulation of SVDD.

Normal Data Description

The most elemental form of SVDD is a normal data description. The SVDD model for normal data description builds a minimum-radius hypersphere around the data. PROC SVDD does not support this description because it is very simplistic and often leads to higher rates of misclassification. PROC SVDD supports the flexible data description (as described in the section Flexible Data Description). SVDD formulation can be expressed in either of the following forms:

Primal Form

The objective function in primal form is

min upper R squared plus upper C sigma-summation Underscript i equals 1 Overscript n Endscripts xi Subscript i

subject to

StartLayout 1st Row  double-vertical-bar x Subscript i Baseline minus a double-vertical-bar squared less-than-or-equal-to upper R squared plus xi Subscript i Baseline for all i equals 1 comma ellipsis comma n 2nd Row  xi Subscript i Baseline greater-than-or-equal-to 0 for all i equals 1 comma ellipsis comma n EndLayout

where x Subscript i Baseline element-of double-struck upper R Superscript m for i=1, …, n represents the training data, R is the radius and represents the decision variable, xi Subscript i is the slack for each variable, a is the center, upper C equals StartFraction 1 Over n f EndFraction is the penalty constant that controls the trade-off between the volume and the errors, and f is the expected outlier fraction.

Dual Form

The dual formulation is obtained from primal formulation by using the method of Lagrange multipliers. The objective function is

max sigma-summation Underscript i equals 1 Overscript n Endscripts alpha Subscript i Baseline left-parenthesis x Subscript i Baseline dot x Subscript i Baseline right-parenthesis minus sigma-summation Underscript i comma j Overscript Endscripts alpha Subscript i Baseline alpha Subscript j Baseline left-parenthesis x Subscript i Baseline dot x Subscript j Baseline right-parenthesis

subject to

StartLayout 1st Row 1st Column Blank 2nd Column sigma-summation Underscript i equals 1 Overscript n Endscripts alpha Subscript i Baseline equals 1 2nd Row 1st Column Blank 2nd Column 0 less-than-or-equal-to alpha Subscript i Baseline less-than-or-equal-to upper C for all i equals 1 comma ellipsis comma n EndLayout

where alpha Subscript i Baseline element-of double-struck upper R are the Lagrange multipliers and upper C equals StartFraction 1 Over n f EndFraction is the penalty constant.

Duality Information

The solution to the dual formulation of SVDD provides values of Lagrange multipliers alpha Subscript i for all training data observations i equals 1 comma ellipsis comma n. Based on the value of alpha Subscript i, the position of an observation in the context of the data description can be determined as follows:

Inside position:

double-vertical-bar x Subscript i Baseline minus a double-vertical-bar less-than upper R long right double arrow alpha Subscript i Baseline equals 0

Boundary position:

double-vertical-bar x Subscript i Baseline minus a double-vertical-bar equals upper R long right double arrow 0 less-than alpha Subscript i Baseline less-than upper C

Outside position:

double-vertical-bar x Subscript i Baseline minus a double-vertical-bar greater-than upper R long right double arrow alpha Subscript i Baseline equals upper C

The center of the data description a can be obtained by using the values of alpha Subscript i for all n observations in the training data as follows:

Center position:

sigma-summation Underscript i equals 1 Overscript n Endscripts alpha Subscript i Baseline x Subscript i Baseline equals a

The circular data boundary can include a significant amount of space in which training observations are very sparsely distributed. Scoring with this model can increase the probability of false positives. Hence, instead of a circular shape, a compact bounded outline around the data is often desired. Such an outline should approximate the shape of the one-class training data. Such a data boundary is possible with the use of kernel functions.

Flexible Data Description

The support vector data description is made flexible by replacing the inner product left-parenthesis x Subscript i Baseline dot x Subscript j Baseline right-parenthesis present in the objective function of (Dual Form) with a suitable kernel function upper K left-parenthesis x Subscript i Baseline comma x Subscript j Baseline right-parenthesis. The radial basis kernel function is defined as

upper K left-parenthesis x comma y right-parenthesis equals exp StartFraction minus double-vertical-bar x minus y double-vertical-bar squared Over 2 s squared EndFraction

where x and y are any two observations from the training data and s is the bandwidth parameter. Using a kernel function, the objective function is

max sigma-summation Underscript i equals 1 Overscript n Endscripts alpha Subscript i Baseline upper K left-parenthesis x Subscript i Baseline comma x Subscript i Baseline right-parenthesis minus sigma-summation Underscript i comma j Overscript Endscripts alpha Subscript i Baseline alpha Subscript j Baseline upper K left-parenthesis x Subscript i Baseline comma x Subscript j Baseline right-parenthesis

subject to

StartLayout 1st Row 1st Column Blank 2nd Column sigma-summation Underscript i equals 1 Overscript n Endscripts alpha Subscript i Baseline equals 1 2nd Row 1st Column Blank 2nd Column 0 less-than-or-equal-to alpha Subscript i Baseline less-than-or-equal-to upper C for all i equals 1 comma ellipsis comma n EndLayout

The results for the center, inside, boundary, and outside positions, which are described in the section Duality Information, hold when the kernel function is used in the mathematical formulation.

The threshold upper R squared is calculated as

upper R squared equals upper K left-parenthesis x Subscript k Baseline comma x Subscript k Baseline right-parenthesis minus 2 sigma-summation Underscript i Overscript Endscripts alpha Subscript i Baseline upper K left-parenthesis x Subscript i Baseline comma x Subscript k Baseline right-parenthesis plus sigma-summation Underscript i comma j Overscript Endscripts alpha Subscript i Baseline alpha Subscript j Baseline upper K left-parenthesis x Subscript i Baseline comma x Subscript j Baseline right-parenthesis

using any x Subscript k Baseline element-of upper S upper V Subscript less-than upper C, where upper S upper V Subscript less-than upper C is the set of support vectors for which alpha Subscript k Baseline less-than upper C.

Scoring

For each observation z in the scoring data set, the distance normal d normal i normal s normal t squared left-parenthesis z right-parenthesis is calculated as follows:

normal d normal i normal s normal t squared left-parenthesis z right-parenthesis equals upper K left-parenthesis z comma z right-parenthesis minus 2 sigma-summation Underscript i Overscript Endscripts alpha Subscript i Baseline upper K left-parenthesis x Subscript i Baseline comma z right-parenthesis plus sigma-summation Underscript i comma j Overscript Endscripts alpha Subscript i Baseline alpha Subscript j Baseline upper K left-parenthesis x Subscript i Baseline comma x Subscript j Baseline right-parenthesis

Observations in the scoring data set for which normal d normal i normal s normal t squared left-parenthesis z right-parenthesis greater-than upper R squared are designated as outliers.

Visual Explanation of SVDD

Figure 7 illustrates key SVDD statistics. The unfilled markers indicate the bivariate training data set. The filled green marker indicates the center a. The filled blue markers are support vectors, which define the data boundary with a threshold upper R squared value of 0.66. The plot shows contour lines for distance values from 0.76 to 1.06. The red markers indicate the outlier observations from the scoring data; their distance values are greater than the threshold upper R squared value. The plot illustrates that as points move away from the training data, their distance value increases. It can be noted that the contours corresponding to different distance values follow the natural geometry of the training data.

Figure 7: Key SVDD Statistics

image1


Last updated: August 06, 2026