All-subsequence embedding kernel 2026-10-31
Here counts increasing position embeddings of the word as a subsequence of . Counting embeddings retains repeated-letter multiplicities. The empty word has one embedding in every string. Prefix dynamic programming computes this positive-semidefinite kernel by with boundary values one. The time complexity is arithmetic operations, and rolling rows require integer cells. Counting pairs of position subsets bounds output bit length by .
Canonical feature space of a positive-semidefinite kernel Created 2026-10-06 Updated 2026-10-14
On the finite formal span of symbols , define and extend bilinearly. For a positive-semidefinite kernel, the null vectors of this positive semidefinite bilinear form form its radical of a bilinear form. Quotienting by that linear subspace gives an inner product space and feature map with . This construction works for degenerate and zero kernels.
A real positive-semidefinite kernel satisfies . This follows from positivity of its two-point kernel matrix. If a diagonal value is zero, the corresponding off-diagonal values must also vanish.
Computational tradeoffs of the kernel trick 2026-10-14
For input coordinates, the homogeneous quadratic polynomial kernel has a weighted quadratic feature map with distinct monomials. Computing an inner product of already stored mapped vectors costs arithmetic operations, whereas costs using the input vectors. Here denotes big O notation. Higher fixed degrees can make the dimension gap much larger.
Sample count still matters. With training examples, materializing a dense kernel matrix stores numbers and requires distinct evaluations using symmetry. A dense direct solve for kernel ridge regression typically takes operations after constructing the kernel matrix, while a dual prediction with nonzero coefficients uses kernel evaluations. Explicit finite feature maps can be preferable when is small relative to , and a stored primal weight vector can make prediction depend on rather than on . The kernel trick by Ryan Giordano (sections Ridge regression and The polynomial kernel) explains the change from feature-coordinate equations to training-example equations; neither representation is universally faster.
The kernel trick saves explicit feature construction when the positive-semidefinite kernel is economical to evaluate; it does not remove the cost of optimization, choose a useful positive-semidefinite kernel, or establish generalization. Random Fourier features illustrate a different tradeoff: replacing the exact Gaussian kernel with a finite approximate feature map can reduce dependence on the sample count while introducing approximation error.
Covariance function Created 2026-09-28 Updated 2026-10-14
For a real-valued stochastic process with finite second moments, write . Its covariance function isThe diagonal gives the variance at each time; off-diagonal values record linear dependence between times. For the independent standard normal random variables above, , whereas the shared Gaussian process has for all . For a fair simple random walk on the integer line, ; Brownian motion has the continuous-time counterpart . These formulas quantify how much random history the observations share.
Every covariance function is a positive-semidefinite kernel. Indeed, for any real coefficients ,Thus a proposed covariance function must make every finite covariance matrix positive semidefinite. For a Gaussian process, the mean function and the covariance function determine every finite-dimensional distribution, including degenerate ones such as the shared process. Conversely, any real positive-semidefinite kernel satisfying , together with a specified mean function, defines consistent multivariate normal distributions; the Kolmogorov extension theorem then constructs a Gaussian process. For a general stochastic process, covariance alone does not determine the full law. The exceptional completeness of this description is what makes Gaussian process regression possible with a mean and a covariance model.
Dual prediction with a kernel 2026-10-14
If the weight vector lies in the linear span of the training feature map outputs, write . ThenThis is a dual representation: coefficients weight training examples rather than feature coordinates. They need not be positive, and need not be unique when the kernel matrix is singular. Some kernel methods instead write with under their own optimization constraints.[ref]
The kernel trick by Ryan Giordano. Kernelizing classification with support vector machines: displayed prediction as a sum of label-weighted kernel evaluations
The formula is an algebraic conversion for a weight vector in this linear span, not a claim about every possible weight vector. The representer theorem gives a broader reason this form appears in regularized kernel methods.For the XOR separation by a product feature, let have rows . The Gram matrix of those rows, equivalently the kernel matrix, isIts eigenvalues are , so it is a positive semidefinite matrix of rank two, not an invertible matrix. More generally, for any real coefficient vector and any finite set of inputs,This proves the positive-semidefinite kernel condition for the displayed polynomial kernel on all of , rather than checking only this square.
Here , so the explicit choice gives and . ConsequentlyFor the new input , the four polynomial kernel evaluations are . Their weighted sum is , and the sign function predicts . No explicit feature map is needed for this calculation. These coefficients were constructed to reproduce the chosen separator; no fitting algorithm or generalization guarantee is being asserted.
Gaussian density kernel 2026-10-14
The Gaussian density kernel is the standard normal probability density used as a unit-integral kernel for density estimation. Its second moment is one and . Its canonical kernel has scale . It is a function of one smoothing displacement, distinct from the two-argument Gaussian kernel used as a positive-semidefinite kernel.
Gaussian kernel 2026-09-24
The Gaussian kernel is a translation-invariant positive-semidefinite kernel whose canonical feature map takes values in an infinite-dimensional vector space.
Suppose is a positive-semidefinite kernel for every and its diagonal entries are integrable. Positivity of each kernel matrix givesThe Cauchy-Schwarz inequality makes every entry integrable, and integrating each nonnegative finite quadratic form shows that is again a positive-semidefinite kernel.
Kernel method 2026-09-24
A kernel method represents data through a positive-semidefinite kernel, allowing algorithms to use inner products in an implicit feature map.
Kernel ridge regression Created 2026-09-24 Updated 2026-10-14
Kernel ridge regression minimizes empirical squared error plus the squared norm in a Reproducing kernel Hilbert space. The representer theorem reduces it to ridge regression with the kernel matrix as its feature Gram matrix.
Kernel trick Created 2026-09-24 Updated 2026-10-14
The kernel trick evaluates inner products of feature map outputs through without explicitly constructing those vectors. An algorithm expressed entirely through these inner products can therefore operate on nonlinear derived coordinates using only evaluations of a positive-semidefinite kernel on the original inputs. A classifier linear in the derived coordinates can have a nonlinear boundary in the original coordinates.
The polynomial kernel gives a finite, fully visible example: corresponds to . The XOR separation by a product feature below makes the interaction coordinate useful, while dual prediction with a kernel shows how to predict without calculating it explicitly.
An arbitrary score called a similarity need not be a positive-semidefinite kernel. Symmetry alone, even with nonnegative entries, is insufficient: the symmetric matrixhas for , so it cannot be a Gram matrix of real inner products. A positive-semidefinite kernel requires a positive semidefinite matrix for every finite choice of inputs, not just the observed training data.[ref]
Gaussian Processes for Machine Learning by Carl Edward Rasmussen and Christopher K. I. Williams. Section 4.1, p. 80: Gram matrices, quadratic-form definition of positive semidefiniteness, and nonnegative eigenvalues
The existing Moore-Aronszajn theorem connects this requirement to a Reproducing kernel Hilbert space; this example needs only finite linear algebra. Laplace kernel 2026-09-28
The Laplace kernel on is a translation-invariant positive-semidefinite kernel. Independent standard Cauchy random variables give its Random Fourier feature representation through their characteristic function .
Mercer kernel Created 2026-10-06 Updated 2026-10-25
In the compact-domain spectral setting, a Mercer kernel is a continuous symmetric positive-semidefinite kernel on a compact space equipped with a finite full-support measure. Mercer's theorem yields nonnegative eigenvalues and an expansion , giving features in . The finite-Gram positivity condition on arbitrary domains is more general than these spectral hypotheses; all such kernels still have a Reproducing kernel Hilbert space realization.
Mercer's theorem 2026-09-28
Mercer's theorem says that a continuous symmetric positive-semidefinite kernel on a compact domain has an orthonormal eigenfunction expansionwith nonnegative eigenvalues and absolute uniform convergence under its standard hypotheses.
Neural tangent kernel Created 2026-10-25 Updated 2026-10-31
For a differentiable neural network and initialization law , the expected neural tangent kernel is , assuming finite diagonal expectations. At a fixed parameter value the corresponding inner product defines the empirical neural tangent kernel. Both are positive-semidefinite kernels, since a finite quadratic form is respectively an expected squared norm or a squared norm. In suitable infinite-width scalings, the empirical kernel matrix converges to a deterministic limit and remains constant during training. Squared-error gradient flow then has the same training-prediction dynamics as kernel regression with this limit, provided the initial predictions match.
The closure property of positive-semidefinite kernels gives three constructions, each seen directly from the feature maps .
- Nonnegative sums: , for . Its feature map is in the Hilbert space direct sum; expanding its inner product gives .
- Pointwise products: . In the Hilbert tensor product, use : the inner product of two such elementary tensors is the product of their two inner products.
- Input-dependent weighting: for any real-valued function . Its feature map is , so signs of are allowed. Nonnegative scalar multiplication is the special case of constant ; the weighting factor is itself a rank-one positive-semidefinite kernel.
Another useful consequence is pullback: if and is a positive-semidefinite kernel on , then has feature map .
In this setting a positive-semidefinite kernel is an inner-product similarity: there exist a real Hilbert space and a feature map such thatThe feature map may be infinite-dimensional. Equivalently, is symmetric and every finite kernel matrix is a positive semidefinite matrix. The equivalence follows by forming the canonical feature space of a positive-semidefinite kernel and taking its Hilbert space completion.
Reciprocation reverses the order of positive numbers, soThis is the pullback of the positive-semidefinite kernel from part (i) by . Explicitly, the feature map into the same L2 space isHence is a positive-semidefinite kernel, with for every allowed input.
Take the real L2 space and the feature mapEach indicator function belongs to because its squared L2 norm is . Their inner product is the length of the overlapping intervals:This realizes as a positive-semidefinite kernel; it is also the Brownian covariance kernel.
