Trisha Shetty (Editor)

Kernel methods for vector output

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

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.

Contents

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, a broad term that refers to systems that learn by transferring knowledge between different domains. 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. 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 k-nearest neighbors in the 1990s. 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. 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. While the Bayesian and regularization perspectives were developed independently, they are in fact closely related.

Notation

In this context, the supervised learning problem is to learn the function f which best predicts vector-valued outputs y i given inputs (data) x i .

f ( x i ) = y i for i = 1 , , N x i X , an input space (e.g. X = R p ) y i R D

In general, each component of ( y i ), could have different input data ( x d , i ) with different cardinality ( p ) and even different input spaces ( X ). 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.

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

Regularization perspective

From the regularization perspective, the problem is to learn f belonging to a reproducing kernel Hilbert space of vector-valued functions ( H ). This is similar to the scalar case of Tikhonov regularization, with some extra care in the notation.

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 X × { 1 , , 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 f , consisting of D outputs { f d } d = 1 D , is assumed to follow a Gaussian process:

f G P ( m , K )

where m : X R D is now a vector of the mean functions { m d ( x ) } d = 1 D for the outputs and K is a positive definite matrix-valued function with entry ( K ( x , x ) ) d , d corresponding to the covariance between the outputs f d ( x ) and f d ( x ) .

For a set of inputs X , the prior distribution over the vector f ( X ) is given by N ( m ( X ) , K ( X , X ) ) , where m ( X ) is a vector that concatenates the mean vectors associated to the outputs and K ( X , X ) is a block-partitioned matrix. The distribution of the outputs is taken to be Gaussian:

p ( y f , x , Σ ) = N ( f ( x ) , Σ )

where Σ R D × D is a diagonal matrix with elements { σ d 2 } d = 1 D specifying the noise for each output. Using this form for the likelihood, the predictive distribution for a new vector x is:

p ( f ( x ) S , f , x , ϕ ) = N ( f ( x ) , K ( x , x ) )

where S is the training data, and ϕ is a set of hyperparameters for K ( x , x ) and Σ .

Equations for f and K can then be obtained:

f ( x ) = K x T ( K ( X , X ) + Σ ) 1 y ¯ K ( x , x ) = K ( x , x ) K x ( K ( X , X ) + Σ ) 1 K x T

where Σ = Σ I N , K x R D × N D has entries ( K ( x , x j ) ) d , d for j = 1 , , N and d , d = 1 , , D . Note that the predictor 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.

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 ) k T ( d , d ) k : scalar kernel on X × X k T : scalar kernel on { 1 , , D } × { 1 , , D }

In matrix form: K ( x , x ) = k ( x , x ) B    where B is a D × 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

Derived from regularizer

One way of obtaining k T 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 ω ( C ω l = 1 D f l k 2 + ω D l = 1 D f l f ¯ k 2 )

where:

  • A ω = 1 2 ( 1 ω ) ( 1 ω + ω D )
  • C ω = ( 2 2 ω + ω D )
  • f ¯ = 1 D q = 1 D f q
  • K ω ( x , x ) = k ( x , x ) ( ω 1 + ( 1 ω ) I D
  • where 1  is a  D × D matrix with all entries equal to 1.

    This regularizer is a combination of limiting the complexity of each component of the estimator ( f l ) and forcing each component of the estimator to be close to the mean of all the components. Setting ω = 0 treats all the components as independent and is the same as solving the scalar problems separately. Setting ω = 1 assumes all the components are explained by the same function.

    Cluster-based regularizer

    R ( f ) = ε 1 c = 1 r l I ( c ) f l f c ¯ k 2 + ε 2 c = 1 r m c f c ¯ k 2

    where:

  • I ( c ) is the index set of components that belong to cluster c
  • m c is the cardinality of cluster c
  • f c ¯ = 1 m c q I ( c ) f q
  • M l , q = 1 m c if l and q both belong to cluster c  ( M l , q = 0 otherwise
  • K ( x , x ) = k ( x , x ) G
  • where G l , q = ε 1 δ l q + ( ε 2 ε 1 ) M l , 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 l , q = 1 D f l f q k 2 M l q + l = 1 D f l k 2 M l , l

    where M  is a  D × D matrix of weights encoding the similarities between the components

    K ( x , x ) = k ( x , x ) L

    where L = D M ,   D l , q = δ l , q ( h = 1 D M l , h + M l , 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, and sparsity-based approaches which assume only a few of the features are needed.

    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 { f d ( x ) } d = 1 D with x R p , each f d is expressed as:

    f d ( x ) = q = 1 Q a d , q u q ( x )

    where a d , q are scalar coefficients and the independent functions u q ( x ) have zero mean and covariance cov [ u q ( x ) , u q ( x ) ] = k q ( x , x ) if q = q and 0 otherwise. The cross covariance between any two functions f d ( x ) and f d ( x ) can then be written as:

    cov [ f d ( x ) , f d ( x ) ] = q = 1 Q i = 1 R q a d , q i a d , q i k q ( x , x ) = q = 1 Q b d , d q k q ( x , x )

    where the functions u q i ( x ) , with q = 1 , , Q and i = 1 , , R q have zero mean and covariance cov [ u q i ( x ) , u q i ( x ) ] = k q ( x , x ) if i = i and q = q . But cov [ f d ( x ) , f d ( x ) ] is given by ( K ( x , x ) ) d , d . Thus the kernel K ( x , x ) can now be expressed as

    K ( x , x ) = q = 1 Q B q k q ( x , x )

    where each B q R D × 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 x (the coregionalization matrix B q ), and one that models the input dependence, independently of { f d ( x ) } d = 1 D (the covariance function k q ( x , x ) ).

    Intrinsic coregionalization model (ICM)

    The ICM is a simplified version of the LMC, with Q = 1 . ICM assumes that the elements b d , d q of the coregionalization matrix B q can be written as b d , d q = v d , d b q , for some suitable coefficients v d , d . With this form for b d , d q :

    cov [ f d ( x ) , f d ( x ) ] = q = 1 Q v d , d b q k q ( x , x ) = v d , d q = 1 Q b q k q ( x , x ) = v d , d k ( x , x )

    where

    k ( x , x ) = q = 1 Q b q k q ( x , x ) .

    In this case, the coefficients

    v d , d = i = 1 R 1 a d , 1 i a d , 1 i = b d , d 1

    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 k q ( 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 R q = 1 (instead of Q = 1 as in ICM). Thus each latent function u q 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:

  • Matrix-valued exponentiated quadratic (EQ) kernels designed to estimate divergence-free or curl-free vector fields (or a convex combination of the two)
  • Kernels defined by transformations
  • In the Bayesian perspective, LMC produces a separable kernel because the output functions evaluated at a point x only depend on the values of the latent functions at 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. 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".

    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 c ¯ :

    c ¯ d = ( k ( X , X ) + λ N σ d I ) 1 y ¯ d σ d

    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 ϕ . There are also works employing a full Bayesian inference by assigning priors to ϕ 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

    K ( X , X ) ¯ = K ( X , X ) + Σ .

    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.

    References

    Kernel methods for vector output Wikipedia