Spectral regularization is any of a class of regularization techniques used in machine learning to control the impact of noise and prevent overfitting. Spectral regularization can be used in a broad range of applications, from deblurring images to classifying emails into a spam folder and a non-spam folder. For instance, in the email classification example, spectral regularization can be used to reduce the impact of noise and prevent overfitting when a machine learning system is being trained on a labeled set of emails to learn how to tell a spam and a non-spam email apart. Spectral regularization algorithms rely on methods that were originally defined and studied in the theory of ill-posed inverse problems (for instance, see[1]) focusing on the inversion of a linear operator (or a matrix) that possibly has a bad condition number or an unbounded inverse. In this context, regularization amounts to substituting the original operator by a bounded operator called the "regularization operator" that has a condition number controlled by a regularization parameter,[2] a classical example being Tikhonov regularization. To ensure stability, this regularization parameter is tuned based on the level of noise.[2] The main idea behind spectral regularization is that each regularization operator can be described using spectral calculus as an appropriate filter on the eigenvalues of the operator that defines the problem, and the role of the filter is to "suppress the oscillatory behavior corresponding to small eigenvalues".[2] Therefore, each algorithm in the class of spectral regularization algorithms is defined by a suitable filter function (which needs to be derived for that particular algorithm). Three of the most commonly used regularization algorithms for which spectral filtering is well-studied are Tikhonov regularization, Landweber iteration, and truncated singular value decomposition (TSVD). As for choosing the regularization parameter, examples of candidate methods to compute this parameter include the discrepancy principle, generalized cross validation, and the L-curve criterion.[3]
It is of note that the notion of spectral filtering studied in the context of machine learning is closely connected to the literature on function approximation (in signal processing).
The training set is defined as [math]\displaystyle{ S = \{(x_1, y_1), \dots , (x_n, y_n)\} }[/math], where [math]\displaystyle{ X }[/math] is the [math]\displaystyle{ n \times d }[/math] input matrix and [math]\displaystyle{ Y = (y_1,\dots,y_n) }[/math] is the output vector. Where applicable, the kernel function is denoted by [math]\displaystyle{ k }[/math], and the [math]\displaystyle{ n \times n }[/math] kernel matrix is denoted by [math]\displaystyle{ K }[/math] which has entries [math]\displaystyle{ K_{ij} = k(x_i,x_j) }[/math] and [math]\displaystyle{ \mathcal{H} }[/math] denotes the Reproducing Kernel Hilbert Space (RKHS) with kernel [math]\displaystyle{ k }[/math]. The regularization parameter is denoted by [math]\displaystyle{ \lambda }[/math].
(Note: For [math]\displaystyle{ g \in G }[/math] and [math]\displaystyle{ f \in F }[/math], with [math]\displaystyle{ G }[/math] and [math]\displaystyle{ F }[/math] being Hilbert spaces, given a linear, continuous operator [math]\displaystyle{ L }[/math], assume that [math]\displaystyle{ g = Lf }[/math] holds. In this setting, the direct problem would be to solve for [math]\displaystyle{ g }[/math] given [math]\displaystyle{ f }[/math] and the inverse problem would be to solve for [math]\displaystyle{ f }[/math] given [math]\displaystyle{ g }[/math]. If the solution exists, is unique and stable, the inverse problem (i.e. the problem of solving for [math]\displaystyle{ f }[/math]) is well-posed; otherwise, it is ill-posed.)
The connection between the regularized least squares (RLS) estimation problem (Tikhonov regularization setting) and the theory of ill-posed inverse problems is an example of how spectral regularization algorithms are related to the theory of ill-posed inverse problems.
The RLS estimator solves
and the RKHS allows for expressing this RLS estimator as [math]\displaystyle{ f_S^\lambda (X)=\sum_{i=1}^n c_i k(x,x_i) }[/math] where [math]\displaystyle{ (K+n\lambda I)c=Y }[/math] with [math]\displaystyle{ c=(c_1,\dots,c_n) }[/math].[4] The penalization term is used for controlling smoothness and preventing overfitting. Since the solution of empirical risk minimization [math]\displaystyle{ \min_{f\in\mathcal{H}} \frac{1}{n}\sum_{i=1}^{n}(y_i-f(x_i))^2 }[/math] can be written as [math]\displaystyle{ f_S^{\lambda}(X)=\sum_{i=1}^n c_i k(x,x_i) }[/math] such that [math]\displaystyle{ Kc=Y }[/math], adding the penalty function amounts to the following change in the system that needs to be solved:[5]
In this learning setting, the kernel matrix can be decomposed as [math]\displaystyle{ K = Q\Sigma Q^T }[/math], with
and [math]\displaystyle{ q_1,\dots,q_n }[/math] are the corresponding eigenvectors. Therefore, in the initial learning setting, the following holds:
Thus, for small eigenvalues, even small perturbations in the data can lead to considerable changes in the solution. Hence, the problem is ill-conditioned, and solving this RLS problem amounts to stabilizing a possibly ill-conditioned matrix inversion problem, which is studied in the theory of ill-posed inverse problems; in both problems, a main concern is to deal with the issue of numerical stability.
Each algorithm in the class of spectral regularization algorithms is defined by a suitable filter function, denoted here by [math]\displaystyle{ G_{\lambda}(\cdot) }[/math]. If the Kernel matrix is denoted by [math]\displaystyle{ K }[/math], then [math]\displaystyle{ \lambda }[/math] should control the magnitude of the smaller eigenvalues of [math]\displaystyle{ G_{\lambda}(K) }[/math]. In a filtering setup, the goal is to find estimators [math]\displaystyle{ f_S^{\lambda}(X):=\sum_{i=1}^n c_i k(x,x_i) }[/math] where [math]\displaystyle{ c=G_{\lambda}(K)Y }[/math]. To do so, a scalar filter function [math]\displaystyle{ G_\lambda(\sigma) }[/math] is defined using the eigen-decomposition of the kernel matrix:
which yields
Typically, an appropriate filter function should have the following properties:[5]
1. As [math]\displaystyle{ \lambda }[/math] goes to zero, [math]\displaystyle{ G_\lambda (\sigma)~\rightarrow ~1/\sigma }[/math].
2. The magnitude of the (smaller) eigenvalues of [math]\displaystyle{ G_{\lambda} }[/math] is controlled by [math]\displaystyle{ \lambda }[/math].
While the above items give a rough characterization of the general properties of filter functions for all spectral regularization algorithms, the derivation of the filter function (and hence its exact form) varies depending on the specific regularization method that spectral filtering is applied to.
In the Tikhonov regularization setting, the filter function for RLS is described below. As shown in,[4] in this setting, [math]\displaystyle{ c=(K+n\lambda I)^{-1}Y }[/math]. Thus,
The undesired components are filtered out using regularization:
The filter function for Tikhonov regularization is therefore defined as:[5]
[math]\displaystyle{ G_\lambda (\sigma)=\frac{1}{\sigma+n\lambda }. }[/math]
The idea behind the Landweber iteration is gradient descent:[5]
In this setting, if [math]\displaystyle{ n }[/math] is larger than [math]\displaystyle{ K }[/math]'s largest eigenvalue, the above iteration converges by choosing [math]\displaystyle{ \eta = 2/n }[/math] as the step-size:.[5] The above iteration is equivalent to minimizing [math]\displaystyle{ \frac{1}{n}||Y-Kc||_2^2 }[/math] (i.e. the empirical risk) via gradient descent; using induction, it can be proved that at the [math]\displaystyle{ t }[/math]-th iteration, the solution is given by [5]
Thus, the appropriate filter function is defined by:
[math]\displaystyle{ G_\lambda(\sigma)=\eta\sum_{i=0}^{t-1}(I-\eta\sigma)^i. }[/math]
It can be shown that this filter function corresponds to a truncated power expansion of [math]\displaystyle{ K^{-1} }[/math];[5] to see this, note that the relation [math]\displaystyle{ \sum_{i\geq0} x^i = 1/(1 - x) }[/math], would still hold if [math]\displaystyle{ x }[/math] is replaced by a matrix; thus, if [math]\displaystyle{ K }[/math] (the kernel matrix), or rather [math]\displaystyle{ I - \eta K }[/math], is considered, the following holds:
In this setting, the number of iterations gives the regularization parameter; roughly speaking, [math]\displaystyle{ t \sim 1/\lambda }[/math].[5] If [math]\displaystyle{ t }[/math] is large, overfitting may be a concern. If [math]\displaystyle{ t }[/math] is small, oversmoothing may be a concern. Thus, choosing an appropriate time for early stopping of the iterations provides a regularization effect.
In the TSVD setting, given the eigen-decomposition [math]\displaystyle{ K = Q\Sigma Q^T }[/math] and using a prescribed threshold [math]\displaystyle{ \lambda n }[/math], a regularized inverse can be formed for the kernel matrix by discarding all the eigenvalues that are smaller than this threshold.[5] Thus, the filter function for TSVD can be defined as
It can be shown that TSVD is equivalent to the (unsupervised) projection of the data using (kernel) Principal Component Analysis (PCA), and that it is also equivalent to minimizing the empirical risk on the projected data (without regularization).[5] Note that the number of components kept for the projection is the only free parameter here.
Original source: https://en.wikipedia.org/wiki/Regularization by spectral filtering.
Read more |