Kernel spectral angle mapper

This communication introduces a very simple generalisation of the familiar spectral angle mapper (SAM) distance. SAM is perhaps the most widely used distance in chemometrics, hyperspectral imaging, and remote sensing applications. It is shown that a nonlinear version of SAM can be readily obtained by measuring the angle between pairs of vectors in a reproducing kernel Hilbert spaces. The kernel SAM generalises the angle measure to higher-order statistics, it is a valid reproducing kernel, it is universal, and it has consistent geometrical properties that permit deriving a metric easily. We illustrate its per- formance in a target detection problem using very high resolution imagery. Excellent results and insensitivity to parameter tuning over competing methods make it a valuable choice for many applications.

The nonlinear SAM requires the definition of a feature mapping ϕ(·) to a Hilbert space H endorsed with the kernel reproducing property. f (x) = kf , K(x, · )l and kK( · , x), K( · , z)l H = K(x, z). This is the reproducing property of the kernel. A function f can thus be represented as a linear function defined by an inner product in the vector space H. Now, if we simply map the original spectra to H with a mapping f: R d H, the SAM can be expressed in H as Having access to the coordinates of the new mapped spectra is not possible unless one explicitly defines the mapping function ϕ. Nevertheless, thanks to the reproducing Property 1, it is possible to compute the new measure implicitly via kernels Popular examples of reproducing kernels are the linear kernel, K(x, z) = x`z, the polynomial K(x, z) = (x`z + 1) p , and the radial basis function (RBF) kernel, K(x, z) = exp (−(1/2s 2 ) x − z 2 ). In the linear kernel, the associated RKHS is the space R d itself and KSAM reduces to the standard linear SAM. In polynomial kernels of degree p, KSAM effectively compares only moments up to order p. For the Gaussian kernel, the RKHS is of infinite dimension and KSAM measures higher order spectral dependences. In addition, note that for RBF kernels, self-similarity K(x, x) = 1, and thus the measure simply reduces to u K = arccos (K(x, z)), 0 ≤ θ K ≤ π/2. The derived KSAM has some additional properties that allow its use in any kernel machine.

Property 2 (KSAM is a valid Mercer's Kernel):
The KSAM is a valid reproducing kernel because the arccos-operation simply expands the argument in an infinite sum of SAM distances weighted by positive scalars α k , i.e. u K = 1 k=0 a k u k .

Property 3 (KSAM is universal):
The KSAM is a universal kernel on every compact subset of the input domain X because of the previous series expansion [8].
Geometrical interpretation of KSAM: Kernel methods may appear elusive because the mapping ϕ is not explicitly defined, and the vector coordinates in the new feature spaces are not accessible. However, the framework allows to compute distances, angles, displacements, averages, and covariances implicitly in H from the available data [7]. In addition, and very importantly, we show here that one can compute the metric associated to the used kernel. For any positive definite kernel, we assume that the mapped data in H are distributed in a surface S smooth enough to be considered a Riemannian manifold [9]. The line element of S can be expressed as where superscripts a and b correspond to the vector space H, g μν is the induced metric, and the surface S is parametrised by x μ . Computing the components of the (symmetric) metric tensor only need the kernel function For the RBF kernel with σ parameter, this metric tensor becomes flat, g μν = δ μν /σ 2 , and the squared geodesic distance between f(x) and f(z) simply becomes Note that the metric solely depends on the original spectra yet computed implicitly in a higher dimensional feature space H, whose notion of distance is controlled by the parameter σ: the higher the σ the smoother (linear) is the space. Actually, σ → ∞ reduces the RBF kernel to approximately compute the Euclidean distance between vectors, the metric tensor reduces to g μν = 0.
Experimental evidence: A QuickBird image of a residential neighbourhood of Zürich, Switzerland is used for illustration purposes. The image size is (329 × 347) pixels. A total of 40,762 pixels were labelled by photointerpretation and assigned to nine landuse classes (Fig. 2). Four target detectors are compared in the task of detecting the class 'Soil': orthogonal subspace projection (OSP) [10], its kernel counterpart (KOSP) [11], standard SAM [1], and the extension KSAM are presented here. Fig. 1 shows the receiver operating characteristic (ROC) curves, and the area under the ROC curves as a function of the kernel lengthscale parameter σ. KSAM shows excellent detection rates, especially remarkable in the inset plot (note the logarithmical scale). Perhaps more importantly, the KSAM method is relatively insensitive to the selection of the kernel parameter compared with the KOSP detector, provided that a large enough value is specified.  The latter experiments allow us to use a traditional prescription to fix the RBF kernel parameter σ for both KOSP and KSAM as the mean distance among all spectra, d M . Note that after data standardisation and proper scaling, this is a reasonable heuristic σ ≈ d M = 1. The thresholds were optimised for all methods. OSP returns a decision function strongly contaminated by noise, while the KOSP detector results in a correct detection. Fig. 2 shows the detection maps and the metric learned. The (linear) SAM gives rise to very good detection but with strong false alarms in the bottom left side of the image, where the roof of the commercial centre saturates the sensor and thus returns a flat spectrum for its pixels in the morphological features. As a consequence, both the target and the roof vectors have flat spectra and their spectral angle is almost null. The proposed KSAM can efficiently cope with these (nonlinear) saturation problems. In addition, the metric space derived from the kernel suggests high discriminative (and spatially localised) capabilities.
Conclusions: A nonlinear generalisation of the SAM metric was introduced. The KSAM replaces the dot product between spectra by a positive-definite kernel function. It is shown the metric induced by the kernel function and provided a geometrical intuition for tuning the kernel parameter. Experiments on a real multispectral VHR multispectral image illustrated the validity and effectiveness of the proposed method.