Bayesian interpretation of kernel regularization examines how kernel methods in machine learning can be understood through the lens of Bayesian statistics, a framework that uses probability to model uncertainty. Kernel methods are founded on the concept of similarity between inputs within a structured space. While techniques like support vector machines (SVMs) and their regularization (a technique to make a model more generalizable and transferable) were not originally formulated using Bayesian principles, analyzing them from a Bayesian perspective provides valuable insights. In the Bayesian framework, kernel methods serve as a fundamental component of Gaussian processes, where the kernel function operates as a covariance function that defines relationships between inputs. Traditionally, these methods have been applied to supervised learning problems where inputs are represented as vectors and outputs as scalars. Recent developments have extended kernel methods to handle multiple outputs, as seen in multi-task learning. The mathematical framework for kernel methods typically involves reproducing kernel Hilbert spaces (RKHS). Not all kernels form inner product spaces, as they may not always be positive semidefinite (a property ensuring non-negative similarity measures), but they still operate within these more general RKHS. A mathematical equivalence between regularization approaches and Bayesian methods can be established, particularly in cases where the reproducing kernel Hilbert space is finite-dimensional. This equivalence demonstrates how both perspectives converge to essentially the same estimators, revealing the underlying connection between these seemingly different approaches.
The supervised learning problem The classical supervised learning problem requires estimating the output for some new input point 𝐱′ by learning a scalar-valued estimator f̂(𝐱′) on the basis of a training set S consisting of n input-output pairs, S=(𝐗,𝐘)=(𝐱1,y1),…,(𝐱n,yn). Given a symmetric and positive bivariate function k(⋅,⋅) called a kernel, one of the most popular estimators in machine learning is given by
where 𝐊≡k(𝐗,𝐗) is the kernel matrix with entries 𝐊ij=k(𝐱i,𝐱j), 𝐤=[k(𝐱1,𝐱′),…,k(𝐱n,𝐱′)]⊤, and 𝐘=[y1,…,yn]⊤. We will see how this estimator can be derived both from a regularization and a Bayesian perspective.
A regularization perspective The main assumption in the regularization perspective is that the set of functions ℱ is assumed to belong to a reproducing kernel Hilbert space ℋk.
Reproducing kernel Hilbert space A reproducing kernel Hilbert space (RKHS) ℋk is a Hilbert space of functions defined by a symmetric, positive-definite function k:𝒳×𝒳→ℝ called the reproducing kernel such that the function k(𝐱,⋅) belongs to ℋk for all 𝐱∈𝒳. There are three main properties that make an RKHS appealing: 1. The reproducing property, after which the RKHS is named,
f(𝐱)=⟨f,k(𝐱,⋅)⟩k,∀ f∈ℋk, where ⟨⋅,⋅⟩k is the inner product in ℋk. 2. Functions in an RKHS are in the closure of the linear combination of the kernel at given points,
f(𝐱)=∑ik(𝐱i,𝐱)ci. This allows the construction in a unified framework of both linear and generalized linear models. 3. The squared norm in an RKHS can be written as
‖f‖k2=∑i,jk(𝐱i,𝐱j)cicj and could be viewed as measuring the complexity of the function.
The regularized functional The estimator is derived as the minimizer of the regularized functional
where f∈ℋk and ‖⋅‖k is the norm in ℋk. The first term in this functional, which measures the average of the squares of the errors between the f(𝐱i) and the yi, is called the empirical risk and represents the cost we pay by predicting f(𝐱i) for the true value yi. The second term in the functional is the squared norm in a RKHS multiplied by a weight λ and serves the purpose of stabilizing the problem as well as of adding a trade-off between fitting and complexity of the estimator. The weight λ, called the regularizer, determines the degree to which instability and complexity of the estimator should be penalized (higher penalty for increasing value of λ).
Derivation of the estimator The explicit form of the estimator in equation (1) is derived in two steps. First, the representer theorem states that the minimizer of the functional (2) can always be written as a linear combination of the kernels centered at the training-set points,
for some 𝐜∈ℝn. The explicit form of the coefficients 𝐜=[c1,…,cn]⊤ can be found by substituting for f(⋅) in the functional (2). For a function of the form in equation (3), we have that
‖f‖k2=⟨f,f⟩k,=⟨∑i=1Ncik(𝐱i,⋅),∑j=1Ncjk(𝐱j,⋅)⟩k,=∑i=1N∑j=1Ncicj⟨k(𝐱i,⋅),k(𝐱j,⋅)⟩k,=∑i=1N∑j=1Ncicjk(𝐱i,𝐱j),=𝐜⊤𝐊𝐜. We can rewrite the functional (2) as
1n‖𝐲−𝐊𝐜‖2+λ𝐜⊤𝐊𝐜. This functional is convex in 𝐜 and therefore we can find its minimum by setting the gradient with respect to 𝐜 to zero,
−1n𝐊(𝐘−𝐊𝐜)+λ𝐊𝐜=0,(𝐊+λn𝐈)𝐜=𝐘,𝐜=(𝐊+λn𝐈)−1𝐘. Substituting this expression for the coefficients in equation (3), we obtain the estimator stated previously in equation (1),
f̂(𝐱′)=𝐤⊤(𝐊+λn𝐈)−1𝐘.
A Bayesian perspective The notion of a kernel plays a crucial role in Bayesian probability as the covariance function of a stochastic process called the Gaussian process.
A review of Bayesian probability As part of the Bayesian framework, the Gaussian process specifies the prior distribution that describes the prior beliefs about the properties of the function being modeled. These beliefs are updated after taking into account observational data by means of a likelihood function that relates the prior beliefs to the observations. Taken together, the prior and likelihood lead to an updated distribution called the posterior distribution that is customarily used for predicting test cases.
The Gaussian process A Gaussian process (GP) is a stochastic process in which any finite number of random variables that are sampled follow a joint Normal distribution. The mean vector and covariance matrix of the Gaussian distribution completely specify the GP. GPs are usually used as a priori distribution for functions, and as such the mean vector and covariance matrix can be viewed as functions, where the covariance function is also called the kernel of the GP. Let a function f follow a Gaussian process with mean function m and kernel function k,
f∼𝒢𝒫(m,k). In terms of the underlying Gaussian distribution, we have that for any finite set 𝐗={𝐱i}i=1n if we let f(𝐗)=[f(𝐱1),…,f(𝐱n)]⊤ then
… excerpt ends here. Continue reading the full article.