Kernel methods for vector output explained

Kernel methods are a well-established tool to analyze the relationship between input data and the corresponding output of a function. Kernels encapsulate the properties of functions in a computationally efficient way and allow algorithms to easily swap functions of varying complexity.

In typical machine learning algorithms, these functions produce a scalar output. Recent development of kernel methods for functions with vector-valued output is due, at least in part, to interest in simultaneously solving related problems. Kernels which capture the relationship between the problems allow them to borrow strength from each other. Algorithms of this type include multi-task learning (also called multi-output learning or vector-valued learning), transfer learning, and co-kriging. Multi-label classification can be interpreted as mapping inputs to (binary) coding vectors with length equal to the number of classes.

In Gaussian processes, kernels are called covariance functions. Multiple-output functions correspond to considering multiple processes. See Bayesian interpretation of regularization for the connection between the two perspectives.

History

The history of learning vector-valued functions is closely linked to transfer learning- storing knowledge gained while solving one problem and applying it to a different but related problem. The fundamental motivation for transfer learning in the field of machine learning was discussed in a NIPS-95 workshop on “Learning to Learn”, which focused on the need for lifelong machine learning methods that retain and reuse previously learned knowledge. Research on transfer learning has attracted much attention since 1995 in different names: learning to learn, lifelong learning, knowledge transfer, inductive transfer, multitask learning, knowledge consolidation, context-sensitive learning, knowledge-based inductive bias, metalearning, and incremental/cumulative learning.[1] Interest in learning vector-valued functions was particularly sparked by multitask learning, a framework which tries to learn multiple, possibly different tasks simultaneously.

Much of the initial research in multitask learning in the machine learning community was algorithmic in nature, and applied to methods such as neural networks, decision trees and -nearest neighbors in the 1990s.[2] The use of probabilistic models and Gaussian processes was pioneered and largely developed in the context of geostatistics, where prediction over vector-valued output data is known as cokriging.[3] [4] [5] Geostatistical approaches to multivariate modeling are mostly formulated around the linear model of coregionalization (LMC), a generative approach for developing valid covariance functions that has been used for multivariate regression and in statistics for computer emulation of expensive multivariate computer codes. The regularization and kernel theory literature for vector-valued functions followed in the 2000s.[6] [7] While the Bayesian and regularization perspectives were developed independently, they are in fact closely related.[8]

Notation

In this context, the supervised learning problem is to learn the function

f

which best predicts vector-valued outputs
yi
given inputs (data)
xi
.
f(xi)

=

yi
for

i=1,\ldots,N

xi

\inl{X}

, an input space (e.g.

l{X}=Rp

)
yi

\inRD

In general, each component of (

yi
), could have different input data (
xd,i
) with different cardinality (

p

) and even different input spaces (

l{X}

).[8] Geostatistics literature calls this case heterotopic, and uses isotopic to indicate that the each component of the output vector has the same set of inputs.[9]

Here, for simplicity in the notation, we assume the number and sample space of the data for each output are the same.

Regularization perspective[10]

From the regularization perspective, the problem is to learn

f*

belonging to a reproducing kernel Hilbert space of vector-valued functions (

l{H}

). This is similar to the scalar case of Tikhonov regularization, with some extra care in the notation.
Vector-valued case Scalar case
Reproducing kernel

K:l{X} x l{X}RD

k:l{X} x l{X}R

Learning problem

f*=\operatorname{argmin}

D
\sum\limits
j=1
1
N
N
\sum\limits
i=1
(f
j(xi)

-yj,i)2+λ\Vertf

2
\Vert
K

f*=\operatorname{argmin}

1
N
N
\sum\limits
i=1
(f(xi)

-yi)2+λ\Vertf

2
\Vert
k
Solution

(derived via the representer theorem

\dagger

)

f*(x)=

N
\sum\limits
i=1
K(xi,x)c
i

with

\bar{c

} = (\mathbf(\mathbf,\mathbf) + \lambda N\mathbf(I))^\bar ,
where

\bar{c

} \text \bar are the coefficients and output vectors concatenated to form

ND

vectors and

K(X,X)isanND x ND

matrix of

N x N

blocks:
(K(xi,xj))
d,d'

f*(x)=

N
\sum\limits
i=1
k(xi,x)c
i

=

\intercal
k
x

c

Solve for

c

by taking the derivative of the learning problem, setting it equal to zero, and substituting in the above expression for

f*

:

c=(K+λI)-1y

where

Kij=

k(xi,xj)

=ith

elementofk
xj

\dagger

It is possible, though non-trivial, to show that a representer theorem also holds for Tikhonov regularization in the vector-valued setting.

Note, the matrix-valued kernel

K

can also be defined by a scalar kernel

R

on the space

l{X} x \{1,\ldots,D\}

. An isometry exists between the Hilbert spaces associated with these two kernels:

(K(x,x'))d,d'=R((x,d),(x',d'))

Gaussian process perspective

The estimator of the vector-valued regularization framework can also be derived from a Bayesian viewpoint using Gaussian process methods in the case of a finite dimensional Reproducing kernel Hilbert space. The derivation is similar to the scalar-valued case Bayesian interpretation of regularization. The vector-valued function

bf{f}

, consisting of

D

outputs

\left\{fd\right\}

D
d=1
, is assumed to follow a Gaussian process:

bf{f}\siml{GP}(bf{m},bf{K})

where

bf{m}:l{X}\tobf{R}D

is now a vector of the mean functions

\left\{md(bf{x})\right\}

D
d=1
for the outputs and

bf{K}

is a positive definite matrix-valued function with entry

(bf{K}(bf{x},bf{x}'))d,d'

corresponding to the covariance between the outputs

fd(bf{x})

and

fd'(bf{x}')

.

For a set of inputs

bf{X}

, the prior distribution over the vector

bf{f}(bf{X})

is given by

l{N}(bf{m}(bf{X}),bf{K}(bf{X},bf{X}))

, where

bf{m}(bf{X})

is a vector that concatenates the mean vectors associated to the outputs and

bf{K}(bf{X},bf{X})

is a block-partitioned matrix. The distribution of the outputs is taken to be Gaussian:

p(bf{y}\midbf{f},bf{x},\Sigma)=l{N}(bf{f}(bf{x}),\Sigma)

where

\Sigma\inl{bf{R}}D

is a diagonal matrix with elements
D
\left\{\sigma
d=1
specifying the noise for each output. Using this form for the likelihood, the predictive distribution for a new vector

bf{x}*

is:

p(bf{f}(bf{x}*)\midbf{S},bf{f},bf{x}*,\phi)=l{N}(bf{f}*(bf{x}*),bf{K}*(bf{x}*,bf{x}*))

where

bf{S}

is the training data, and

\phi

is a set of hyperparameters for

bf{K}(bf{x},bf{x}')

and

\Sigma

.

Equations for

bf{f}*

and

bf{K}*

can then be obtained:

bf{f}*(bf{x}*)=bf{K}bf{x

T(bf{K}(bf{X},bf{X})+\boldsymbol\Sigma)
*}

-1\bar{bf{y}}

bf{K}*(bf{x}*,bf{x}*)=bf{K}(bf{x}*,bf{x}*)-bf{K}bf{x

-1
*}(bf{K}(bf{X},bf{X})+\boldsymbol\Sigma)

bf{K}bf{x

T
*}

where

\boldsymbol\Sigma=\Sigmabf{I}N,bf{K}bf{x*}\inl{bf{R}}D

has entries

(bf{K}(bf{x}*,bf{x}j))d,d'

for

j=1,,N

and

d,d'=1,,D

. Note that the predictor

bf{f}*

is identical to the predictor derived in the regularization framework. For non-Gaussian likelihoods different methods such as Laplace approximation and variational methods are needed to approximate the estimators.

Example kernels

Separable

A simple, but broadly applicable, class of multi-output kernels can be separated into the product of a kernel on the input-space and a kernel representing the correlations among the outputs:

(K(x,x'))d,d'=k(x,x')kT(d,d')

k

: scalar kernel on

l{X} x l{X}

kT

: scalar kernel on

\{1,\ldots,D\} x \{1,\ldots,D\}

In matrix form:

K(x,x')=k(x,x')B

  where

B

is a

D x D

symmetric and positive semi-definite matrix. Note, setting

B

to the identity matrix treats the outputs as unrelated and is equivalent to solving the scalar-output problems separately.

For a slightly more general form, adding several of these kernels yields sum of separable kernels (SoS kernels).

From regularization literature[11] [12] [13] [14]

Derived from regularizer

One way of obtaining

kT

is to specify a regularizer which limits the complexity of

f

in a desirable way, and then derive the corresponding kernel. For certain regularizers, this kernel will turn out to be separable.

Mixed-effect regularizer

R(f)=A\omega(C\omega

D
\sum\limits
l=1

\|fl

2
\|
k

+\omegaD

D
\sum\limits
l=1

\|fl-\bar{f}

2)
\|
k
where:

A\omega=

1
2(1-\omega)(1-\omega+\omegaD)

C\omega=(2-2\omega+\omegaD)

\bar{f}=

1
D
D
\sum\limits
q=1

fq

K\omega(x,x')=k(x,x')(\omega1+(1-\omega)ID

where

1isaD x D

matrix with all entries equal to 1.

This regularizer is a combination of limiting the complexity of each component of the estimator (

fl

) and forcing each component of the estimator to be close to the mean of all the components. Setting

\omega=0

treats all the components as independent and is the same as solving the scalar problems separately. Setting

\omega=1

assumes all the components are explained by the same function.

Cluster-based regularizer

R(f)=\varepsilon1

r
\sum
c=1

\suml\|fl-\bar{fc}\|

2
k

+\varepsilon2

r
\sum\limits
c=1

mc\|\bar{fc}\|

2
k

where:

I(c)

is the index set of components that belong to cluster

c

mc

is the cardinality of cluster

c

\bar{fc}=

1
mc

\sum\limitsqfq

Ml,q=

1
mc

if

l

and

q

both belong to cluster

c

 (

Ml,q=0

otherwise

K(x,x')=k(x,x')G\dagger

where

Gl,q=\varepsilon1\deltalq+(\varepsilon2-\varepsilon1)Ml,q

This regularizer divides the components into

r

clusters and forces the components in each cluster to be similar.

Graph regularizer

R(f)=

1
2
D
\sum\limits
l,q=1

\Vertfl-fq

2
\Vert
k

Mlq+

D
\sum\limits
l=1

\Vertfl

2
\Vert
k

Ml,l

where

MisaD x D

matrix of weights encoding the similarities between the components

K(x,x')=k(x,x')L\dagger

where

L=D-M

,  

Dl,q=\deltal,q

D
(\sum\limits
h=1

Ml,h+Ml,q)

Note,

L

is the graph laplacian. See also: graph kernel.
Learned from data

Several approaches to learning

B

from data have been proposed. These include: performing a preliminary inference step to estimate

B

from the training data, a proposal to learn

B

and

f

together based on the cluster regularizer,[15] and sparsity-based approaches which assume only a few of the features are needed.[16] [17]

From Bayesian literature

Linear model of coregionalization (LMC)

In LMC, outputs are expressed as linear combinations of independent random functions such that the resulting covariance function (over all inputs and outputs) is a valid positive semidefinite function. Assuming

D

outputs

\left\{fd(bf{x})\right\}

D
d=1
with

bf{x}\inl{bf{R}}p

, each

fd

is expressed as:

fd(bf{x})=

Q{a
\sum
d,q

uq(bf{x})}

where

ad,q

are scalar coefficients and the independent functions

uq(bf{x})

have zero mean and covariance cov

[uq(bf{x}),uq'(bf{x}')]=kq(bf{x},bf{x}')

if

q=q'

and 0 otherwise. The cross covariance between any two functions

fd(bf{x})

and

fd'(bf{x})

can then be written as:

\operatorname{cov}[fd(bf{x}),fd'(bf{x}')]=

Rq
\sum
i=1
i
{a
d',q

kq(bf{x},bf{x}')}}=\sum

qk
q(bf{x},bf{x}')}

where the functions

i(bf{x})
u
q
, with

q=1,,Q

and

i=1,,Rq

have zero mean and covariance cov
i'
[u
q'

(bf{x})']=kq(bf{x},bf{x}')

if

i=i'

and

q=q'

. But

\operatorname{cov}[fd(bf{x}),fd'(bf{x}')]

is given by

(bf{K}(bf{x},bf{x}'))d,d'

. Thus the kernel

bf{K}(bf{x},bf{x}')

can now be expressed as
Q{bf{B}
bf{K}(bf{x},bf{x}')=\sum
qk

q(bf{x},bf{x}')}

where each

bf{B}q\inl{bf{R}}D

is known as a coregionalization matrix. Therefore, the kernel derived from LMC is a sum of the products of two covariance functions, one that models the dependence between the outputs, independently of the input vector

bf{x}

(the coregionalization matrix

bf{B}q

), and one that models the input dependence, independently of

\left\{fd(bf{x})\right\}

D
d=1
(the covariance function

kq(bf{x},bf{x}')

).
Intrinsic coregionalization model (ICM)

The ICM is a simplified version of the LMC, with

Q=1

. ICM assumes that the elements
q
b
d,d'
of the coregionalization matrix

Bq

can be written as
q
b
d,d'

=vd,d'bq

, for some suitable coefficients

vd,d'

. With this form for
q
b
d,d'
:

\operatorname{cov}\left[fd(x),fd'(x')\right]=

Q{v
\sum
d,d'

bqkq(x,x')}=vd,d'

Q{b
\sum
qk

q(x,x')}=vd,d'k(x,x')

where

k(x,x')=

Q{b
\sum
qk

q(x,x')}.

In this case, the coefficients

vd,d'=

R1
\sum
i=1
i}
{a
d',1

=

1
b
d,d'

and the kernel matrix for multiple outputs becomes

K(x,x')=k(x,x')B

. ICM is much more restrictive than the LMC since it assumes that each basic covariance

kq(x,x')

contributes equally to the construction of the autocovariances and cross covariances for the outputs. However, the computations required for the inference are greatly simplified.
Semiparametric latent factor model (SLFM)

Another simplified version of the LMC is the semiparametric latent factor model (SLFM), which corresponds to setting

Rq=1

(instead of

Q=1

as in ICM). Thus each latent function

uq

has its own covariance.

Non-separable

While simple, the structure of separable kernels can be too limiting for some problems.

Notable examples of non-separable kernels in the regularization literature include:

In the Bayesian perspective, LMC produces a separable kernel because the output functions evaluated at a point

bf{x}

only depend on the values of the latent functions at

bf{x}

. A non-trivial way to mix the latent functions is by convolving a base process with a smoothing kernel. If the base process is a Gaussian process, the convolved process is Gaussian as well. We can therefore exploit convolutions to construct covariance functions.[20] This method of producing non-separable kernels is known as process convolution. Process convolutions were introduced for multiple outputs in the machine learning community as "dependent Gaussian processes".[21]

Implementation

When implementing an algorithm using any of the kernels above, practical considerations of tuning the parameters and ensuring reasonable computation time must be considered.

Regularization perspective

Approached from the regularization perspective, parameter tuning is similar to the scalar-valued case and can generally be accomplished with cross validation. Solving the required linear system is typically expensive in memory and time. If the kernel is separable, a coordinate transform can convert

K(X,X)

to a block-diagonal matrix, greatly reducing the computational burden by solving D independent subproblems (plus the eigendecomposition of

B

). In particular, for a least squares loss function (Tikhonov regularization), there exists a closed form solution for

\bar{c

}:

\bar{c

}^d = \left (k(\mathbf,\mathbf) + \frac \mathbf \right)^\frac

Bayesian perspective

There are many works related to parameter estimation for Gaussian processes. Some methods such as maximization of the marginal likelihood (also known as evidence approximation, type II maximum likelihood, empirical Bayes), and least squares give point estimates of the parameter vector

\phi

. There are also works employing a full Bayesian inference by assigning priors to

\phi

and computing the posterior distribution through a sampling procedure. For non-Gaussian likelihoods, there is no closed form solution for the posterior distribution or for the marginal likelihood. However, the marginal likelihood can be approximated under a Laplace, variational Bayes or expectation propagation (EP) approximation frameworks for multiple output classification and used to find estimates for the hyperparameters.

The main computational problem in the Bayesian viewpoint is the same as the one appearing in regularization theory of inverting the matrix

\overline{K(X,X)}=K(X,X)+\boldsymbol{\Sigma}.

This step is necessary for computing the marginal likelihood and the predictive distribution. For most proposed approximation methods to reduce computation, the computational efficiency gained is independent of the particular method employed (e.g. LMC, process convolution) used to compute the multi-output covariance matrix. A summary of different methods for reducing computational complexity in multi-output Gaussian processes is presented in.[8]

References

  1. S.J. Pan and Q. Yang, "A survey on transfer learning," IEEE Transactions on Knowledge and Data Engineering, 22, 2010
  2. Rich Caruana, "Multitask Learning," Machine Learning, 41–76, 1997
  3. J. Ver Hoef and R. Barry, "Constructing and fitting models for cokriging and multivariable spatial prediction," Journal of Statistical Planning and Inference, 69:275–294, 1998
  4. P. Goovaerts, "Geostatistics for Natural Resources Evaluation," Oxford University Press, USA, 1997
  5. N. Cressie "Statistics for Spatial Data," John Wiley & Sons Inc. (Revised Edition), USA, 1993
  6. C.A. Micchelli and M. Pontil, "On learning vector-valued functions," Neural Computation, 17:177–204, 2005
  7. C. Carmeli et al., "Vector valued reproducing kernel hilbert spaces of integrable functions and mercer theorem," Anal. Appl. (Singap.), 4
  8. Mauricio A. Álvarez, Lorenzo Rosasco, and Neil D. Lawrence, "Kernels for Vector-Valued Functions: A Review," Foundations and Trends in Machine Learning 4, no. 3 (2012): 195–266. doi: 10.1561/2200000036 arXiv:1106.6251
  9. Hans Wackernagel. Multivariate Geostatistics. Springer-Verlag Heidelberg New york, 2003.
  10. C.Carmeli, E.DeVito, and A.Toigo. Vector valued reproducing kernel Hilbert spaces of integrable functions and Mercer theorem. Anal. Appl. (Singap.), 4(4):377–408, 2006.
  11. C.A. Micchelli and M. Pontil. On learning vector–valued functions. Neural Computation, 17:177–204, 2005.
  12. C. A. Micchelli and M. Pontil. Kernels for multi-task learning. In Advances in Neural Information Processing Systems (NIPS). MIT Press, 2004.
  13. T.Evgeniou, C.A.Micchelli, and M.Pontil. Learning multiple tasks with kernel methods. Journal of Machine Learning Research, 6:615–637, 2005.
  14. L. Baldassarre, L. Rosasco, A. Barla, and A. Verri. Multi-output learning via spectral filtering. Technical report, Massachusetts Institute of Technology, 2011. MIT-CSAIL-TR-2011-004, CBCL-296.
  15. Laurent Jacob, Francis Bach, and Jean-Philippe Vert. Clustered multi-task learning: A convex formulation. In NIPS 21, pages 745–752, 2008.
  16. Andreas Argyriou, Theodoros Evgeniou, and Massimiliano Pontil. Convex multi-task feature learning. Machine Learning, 73(3):243–272, 2008.
  17. Andreas Argyriou, Andreas Maurer, and Massimiliano Pontil. An algorithm for transfer learning in a heterogeneous environment. In ECML/PKDD (1), pages 71–85, 2008.
  18. I. Maceˆdo and R. Castro. Learning divergence-free and curl-free vector fields with matrix-valued kernels. Technical report, Instituto Nacional de Matematica Pura e Aplicada, 2008.
  19. A. Caponnetto, C.A. Micchelli, M. Pontil, and Y. Ying. Universal kernels for multi-task learning. Journal of Machine Learning Research, 9:1615–1646, 2008.
  20. D. Higdon, "Space and space-time modeling using process convolutions, Quantitative methods for current environmental issues, 37–56, 2002
  21. P. Boyle and M. Frean, "Dependent gaussian processes, Advances in Neural Information Processing Systems, 17:217–224, MIT Press, 2005