In the theory of stochastic processes, the Karhunen–Loève theorem (named after Kari Karhunen and Michel Loève) is a representation of a stochastic process as an infinite linear combination of orthogonal functions, analogous to a Fourier series representation of a function on a bounded interval. Stochastic processes given by infinite series of this form were considered earlier by Damodar Dharmananda Kosambi.[1] There exist many such expansions of a stochastic process: if the process is indexed over [a, b], any orthonormal basis of L2([a, b]) yields an expansion thereof in that form. The importance of the Karhunen–Loève theorem is that it yields the best such basis in the sense that it minimizes the total mean squared error.
In contrast to a Fourier series where the coefficients are real numbers and the expansion basis consists of sinusoidal functions (that is, sine and cosine functions), the coefficients in the Karhunen–Loève theorem are random variables and the expansion basis depends on the process. In fact, the orthogonal basis functions used in this representation are determined by the covariance function of the process. One can think that the Karhunen–Loève transform adapts to the process in order to produce the best possible basis for its expansion.
In the case of a centered stochastic process {Xt}t ∈ [a, b] (where centered means that the expectations E(Xt) are defined and equal to 0 for all values of the parameter t in [a, b]) satisfying a technical continuity condition, Xt admits a decomposition
where Zk are pairwise uncorrelated random variables and the functions ek are continuous real-valued functions on [a, b] that are pairwise orthogonal in L2[a, b]. It is therefore sometimes said that the expansion is bi-orthogonal since the random coefficients Zk are orthogonal in the probability space while the deterministic functions ek are orthogonal in the time domain. The general case of a process Xt that is not centered can be brought back to the case of a centered process by considering (Xt − E(Xt)) which is a centered process.
Moreover, if the process is Gaussian, then the random variables Zk are Gaussian and stochastically independent. This result generalizes the Karhunen–Loève transform. An important example of a centered real stochastic process on [0,1] is the Wiener process; the Karhunen–Loève theorem can be used to provide a canonical orthogonal representation for it. In this case the expansion consists of sinusoidal functions.
The above expansion into uncorrelated random variables is also known as the Karhunen–Loève expansion or Karhunen–Loève decomposition. The empirical version (i.e., with the coefficients computed from a sample) is known as the Karhunen–Loève transform (KLT), principal component analysis, proper orthogonal decomposition (POD), Empirical orthogonal functions (a term used in meteorology and geophysics), or the Hotelling transform.
Contents |
Formulation
- Throughout this article, we will consider a square integrable zero-mean random process Xt defined over a probability space (Ω,F,P) and indexed over a closed interval [a, b], with covariance function KX(s,t). We thus have:
- We associate to KX a linear operator TKX defined in the following way:
Since TKX is a linear operator, it makes sense to talk about its eigenvalues λk and eigenfunctions ek, which are found solving the homogeneous Fredholm integral equation of the second kind
Statement of the theorem
Theorem. Let Xt be a zero-mean square integrable stochastic process defined over a probability space (Ω,F,P) and indexed over a closed and bounded interval [a, b], with continuous covariance function KX(s,t).
Then KX(s,t) is a Mercer kernel and letting ek be an orthonormal basis of L2([a, b]) formed by the eigenfunctions of TKX with respective eigenvalues λk, Xt admits the following representation
where the convergence is in L2, uniform in t and
Furthermore, the random variables Zk have zero-mean, are uncorrelated and have variance λk
Note that by generalizations of Mercer's theorem we can replace the interval [a, b] with other compact spaces C and the Lebesgue measure on [a, b] with a Borel measure whose support is C.
Proof
- The covariance function KX satisfies the definition of a Mercer kernel. By Mercer's theorem, there consequently exists a set {λk,ek(t)} of eigenvalues and eigenfunctions of TKX forming an orthonormal basis of L2([a,b]), and KX can be expressed as
- The process Xt can be expanded in terms of the eigenfunctions ek as:
where the coefficients (random variables) Zk are given by the projection of Xt on the respective eigenfunctions
- We may then derive
and:
where we have used the fact that the ek are eigenfunctions of TKX and are orthonormal.
- Let us now show that the convergence is in L2:
let.
which goes to 0 by Mercer's theorem.
Properties of the Karhunen–Loève transform
Special case: Gaussian distribution
Since the limit in the mean of jointly Gaussian random variables is jointly Gaussian, and jointly Gaussian random (centered) variables are independent if and only if they are orthogonal, we can also conclude:
Theorem. The variables Zi have a joint Gaussian distribution and are stochastically independent if the original process {Xt}t is Gaussian.
In the gaussian case, since the variables Zi are independent, we can say more:
almost surely.
The Karhunen–Loève transform decorrelates the process
This is a consequence of the independence of the Zk.
The Karhunen–Loève expansion minimizes the total mean square error
In the introduction, we mentioned that the truncated Karhunen–Loeve expansion was the best approximation of the original process in the sense that it reduces the total mean-square error resulting of its truncation. Because of this property, it is often said that the KL transform optimally compacts the energy.
More specifically, given any orthonormal basis {fk} of L2([a, b]), we may decompose the process Xt as:
where
and we may approximate Xt by the finite sum for some integer N.
Claim. Of all such approximations, the KL approximation is the one that minimizes the total mean square error (provided we have arranged the eigenvalues in decreasing order).
Consider the error resulting from the truncation at the N-th term in the following orthonormal expansion:
The mean-square error εN2(t) can be written as:
We then integrate this last equality over [a, b]. The orthonormality of the fk yields:
The problem of minimizing the total mean-square error thus comes down to minimizing the right hand side of this equality subject to the constraint that the fk be normalized. We hence introduce βk, the Lagrangian multipliers associated with these constraints, and aim at minimizing the following function:
Differentiating with respect to fi(t)$ and setting the derivative to 0 yields:
which is satisfied in particular when , in other words when the fk are chosen to be the eigenfunctions of TKX, hence resulting in the KL expansion.
Explained variance
An important observation is that since the random coefficients Zk of the KL expansion are uncorrelated, the Bienaymé formula asserts that the variance of Xt is simply the sum of the variances of the individual components of the sum:
Integrating over [a, b] and using the orthonormality of the ek, we obtain that the total variance of the process is:
In particular, the total variance of the N-truncated approximation is . As a result, the N-truncated expansion explains
of the variance; and if we are content with an approximation that explains, say, 95% of the variance, then we just have to determine an
such that
.
The Karhunen–Loève expansion has the minimum representation entropy property
Principal Component Analysis
We have established the Karhunen–Loève theorem and derived a few properties thereof. We also noted that one hurdle in its application was the numerical cost of determining the eigenvalues and eigenfunctions of its covariance operator through the Fredholm integral equation of the second kind .
However, when applied to a discrete and finite process , the problem takes a much simpler form and standard algebra can be used to carry out the calculations.
Note that a continuous process can also be sampled at N points in time in order to reduce the problem to a finite version.
We henceforth consider a random N-dimensional vector . As mentioned above, X could contain N samples of a signal but it can hold many more representations depending on the field of application. For instance it could be the answers to a survey or economic data in an econometrics analysis.
As in the continuous version, we assume that X is centered, otherwise we can let (where
is the mean vector of X) which is centered.
Let us adapt the procedure to the discrete case.
Covariance matrix
Recall that the main implication and difficulty of the KL transformation is computing the eigenvectors of the linear operator associated to the covariance function, which are given by the solutions to the integral equation written above.
Define Σ, the covariance matrix of X. Σ is an N by N matrix whose elements are given by:
Rewriting the above integral equation to suit the discrete case, we observe that it turns into:
where is an N-dimensional vector.
The integral equation thus reduces to a simple matrix eigenvalue problem, which explains why the PCA has such a broad domain of applications.
Since Σ is a positive definite symmetric matrix, it possesses a set of orthonormal eigenvectors forming a basis of , and we write
this set of eigenvalues and corresponding eigenvectors, listed in decreasing values of λi. Let also
be the orthonormal matrix consisting of these eigenvectors:
Principal Component Transform
It remains to perform the actual KL transformation which we will call Principal Component Transform in this case. Recall that the transform was found by expanding the process with respect to the basis spanned by the eigenvectors of the covariance function. In this case, we hence have:
In a more compact form, the Principal Component Transform of X is defined by:
The i-th component of Y is , the projection of X on
and the inverse transform
yields the expansion of
on the space spanned by the
:
As in the continuous case, we may reduce the dimensionality of the problem by truncating the sum at some such that
where α is the explained variance threshold we wish to set.
Examples
The Wiener process
There are numerous equivalent characterizations of the Wiener process which is a mathematical formalization of Brownian motion. Here we regard it as the centered standard Gaussian process Wt with covariance function
We restrict the time domain to [a,b]=[0,1] without loss of generality.
The eigenvectors of the covariance kernel are easily determined. These are
and the corresponding eigenvalues are
In order to find the eigenvalues and eigenvectors, we need to solve the integral equation:
differentiating once with respect to t yields:
a second differentiation produces the following differential equation:
The general solution of which has the form:
where A and B are two constants to be determined with the boundary conditions. Setting t=0 in the initial integral equation gives e(0)=0 which implies that B=0 and similarly, setting t=1 in the first differentiation yields e' (1)=0, whence:
which in turn implies that eigenvalues of TKX are:
The corresponding eigenfunctions are thus of the form:
A is then chosen so as to normalize ek:
This gives the following representation of the Wiener process:
Theorem. There is a sequence {Zi}i of independent Gaussian random variables with mean zero and variance 1 such that
Note that this representation is only valid for On larger intervals, the increments are not independent. As stated in the theorem, convergence is in the L2 norm and uniform in t.
The Brownian bridge
Similarly the Brownian bridge which is a stochastic process with covariance function
can be represented as the series
Applications
Adaptive optics systems sometimes use K–L functions to reconstruct wave-front phase information (Dai 1996, JOSA A).
Karhunen–Loève expansion is closely related to the Singular Value Decomposition. The latter has myriad applications in image processing, radar, seismology, and the like. If one has independent vector observations from a vector valued stochastic process then the left singular vectors are maximum likelihood estimates of the ensemble KL expansion.
Applications in signal estimation and detection
Detection of a known continuous signal S(t)
In communication, we usually have to decide whether a signal from a noisy channel contains valuable information. The following hypothesis testing is used for detecting continuous signal s(t) from channel output X(t), N(t) is the channel noise, which is usually assumed zero mean gaussian process with correlation function
![]() |
![]() |
Signal detection in white noise
When The channel noise is white, its correlation function is , and it has constant power spectrum density. In physically practical channel, the noise power is finite. so
.Then the noise correlation function is sinc function with zeros at
. Since are uncorrelated and gaussian, they are independent. Thus we can take samples from X(t) with time spacing
within (0,T). Let
. We have a total of
i.i.d samples
to develop the Likelihood Ratio Test. Define signal
, the problem becomes,
![]() |
![]() |
The log-likelihood ratio . As
. Then G is the test statistics and the Neyman-Pearson Optimum Detector is:
. As G is gaussian, we can characterize it by finding its mean and variances. Then we get
![]() |
![]() ![]() The false alarm error |
And the probability of detection: is the cdf of standard normal gaussian variable.
Signal detection in color noise
When N(t)is colored(correlated in time in some sense) gaussian noise with zero mean and covariance function: We couldn't sample independent discrete observations by evenly spacing the time. Instead, we can use K–L expansion to uncorrelate the noise process and get independent gaussian observation 'samples'. The K–L expansion of N(t):
, where
and the orthonormal bases
are generated by kernal
, i.e, solution to
. Do expansion:
, where
, then
under H and
under K. Let
, we have
are independent guassian r.v's with variance
- under H:
are independent gaussian r.v's.
- under K:
are independent gaussian r.v's.
Hence, the log-LR is given by and the optimum detector is
Define
then
.
How to find k(t)?
Since , k(t) is the solution to
. If N(t)is wide-sense stationary,
, which is known as the Wiener-Hopf Equation. The equation can be solved by taking fourier transform, but not practically realizable since infinite spectrum needs spatial factorization. A special case which is easy to calculate k(t) is white gaussian noise.
. The corresponding impulse response is h(t) = k(T-t) = C S(T-t). Let C = 1, this is just the result we arrived at in previous section for detecting of signal in white noise.
The test threshold for Neyman-Pearson optimum detector?
Since X(t)is gaussian process, is a gaussian random variable that can be characterized by its mean and variance.
Hence, we obtain
![]() |
![]() |
The false alarm error So the test threshold for Neyman-Pearson Optimum Detector is
. Its power of detection is
. When the noise is white gaussian process,
, the signal power.
Prewhitening
For some type of colored noise, a typical practise is to add a prewhiterning filter before the matched filter to transform the colored noise into white noise. For example, N(t) is a wide-sense stationary colored noise with correlation function and
. The transfer function of prewhitening filter is
Detection of a gaussian random signal in AWGN
When the signal we want to detect from the noisy channel is also random, for example, a white gaussian process X(t), we can still implement K–L expansion to get independent sequence of observation. In this case, the detection problem is descibed as follows:
![]() |
![]() ![]() |
The K–L expansion of X(t) is , where
's are solution to
. So
's are independent sequence of r.v's with zero mean and variance
. Expanding Y(t) and N(t) by
, we get
, where
As N(t) is gaussian white noise,
's are i.i.d sequence of r.v with zero mean and variance
, then the problem is simplified as follows,
![]() |
![]() |
The Neyman Pearson Optimal Test: , so the log-likelihood ratio
. Since
is just the minimum-mean-square estimate of
given
's,
. K–L expansion has the following property: If
, where
, then
. So let
,
. Noncausal filter Q(t, s) can be used to get the estimate through
. By orthogonality principle, Q(t,s) satisfies
. However for practical reason, it's necessary to further derive the causal filter h(t, s), where h(t, s) = 0 for s > t, to get estimate
. Specifically,
.
See also
Notes
References
- Stark, Henry; Woods, John W. (1986). Probability, Random Processes, and Estimation Theory for Engineers. Prentice-Hall, Inc. ISBN 0-13-711706-X. http://openlibrary.org/books/OL21138080M/Probability_random_processes_and_estimation_theory_for_engineers.
- Ghanem, Roger; Spanos, Pol (1991). Stochastic finite elements: a spectral approach. Springer-Verlag. ISBN 0-387-97456-3. http://openlibrary.org/books/OL1865197M/Stochastic_finite_elements.
- Guikhman, I.; Skorokhod, A. (1977). Introduction a la Théorie des Processus Aléatoires. Éditions MIR.
- Simon, B. (1979). Functional Integration and Quantum Physics. Academic Press.
- Karhunen, Kari (1947). "Über lineare Methoden in der Wahrscheinlichkeitsrechnung". Ann. Acad. Sci. Fennicae. Ser. A. I. Math.-Phys. 37: 1–79.
- Loève, M. (1978). Probability theory. Vol. II, 4th ed.. Graduate Texts in Mathematics. 46. Springer-Verlag. ISBN 0-387-90262-7.
- Dai, G. (1996). "Modal wave-front reconstruction with Zernike polynomials and Karhunen–Loeve functions". JOSA A 13 (6): 1218. Bibcode 1996JOSAA..13.1218D. DOI:10.1364/JOSAA.13.001218.
- Wu B., Zhu J., Najm F.(2005) "A Non-parametric Approach for Dynamic Range Estimation of Nonlinear Systems". In Proceedings of Design Automation Conference(841-844) 2005
- Wu B., Zhu J., Najm F.(2006) "Dynamic Range Estimation". IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, Vol. 25 Issue:9 (1618-1636) 2006
- Jorgensen, Palle E. T.; Song, Myung-Sin (2007). "Entropy Encoding, Hilbert Space and Karhunen–Loeve Transforms". arXiv:math-ph/0701056. Bibcode 2007JMP....48j3503J.
- Mathar, Richard J. (2008). "Karhunen–Loeve basis functions of Kolmogorov turbulence in the sphere". Baltic Astronomy 17 (3/4): 383–398. Bibcode 2008BaltA..17..383M.
- Mathar, Richard J. (2009). "Modal decomposition of the von-Karman covariance of atmospheric turbulence in the circular entrance pupil". arXiv:0911.4710 [astro-ph.IM]. Bibcode 2009arXiv0911.4710M.
- Mathar, Richard J. (2010). "Karhunen–Loeve basis of Kolmogorov phase screens covering a rectangular stripe". Waves in Random and Complex Media 20 (1): 23–35. Bibcode 2020WRCM...20...23M. DOI:10.1080/17455030903369677.
External links
- Mathematica KarhunenLoeveDecomposition function.
- E161: Computer Image Processing and Analysis notes by Pr. Ruye Wang at Harvey Mudd College [1]