ArticleslgStudy

computer science

Diffusion map

Diffusion map is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Diffusion map rather than just read about it. In short: Diffusion maps is a dimensionality reduction or feature extraction algorithm introduced by Coifman and Lafon which computes a family of embeddings of a data set into Euclidean space (often low-dimensional) whose coordinates can be computed from the eigenvectors and eigenvalues of a diffusion operator on the data. The Euclidean distance between points in the embedded space is equal to the "diffusion distance" between…

Diffusion map — main illustration
Diffusion map — illustration

Key takeaways

  • Diffusion map belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Diffusion map to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Diffusion map from memory before moving on to harder problems.

Reference excerpt

Diffusion maps is a dimensionality reduction or feature extraction algorithm introduced by Coifman and Lafon which computes a family of embeddings of a data set into Euclidean space (often low-dimensional) whose coordinates can be computed from the eigenvectors and eigenvalues of a diffusion operator on the data. The Euclidean distance between points in the embedded space is equal to the "diffusion distance" between probability distributions centered at those points. Different from linear dimensionality reduction methods such as principal component analysis (PCA), diffusion maps are part of the family of nonlinear dimensionality reduction methods which focus on discovering the underlying manifold that the data has been sampled from. By integrating local similarities at different scales, diffusion maps give a global description of the data-set. Compared with other methods, the diffusion map algorithm is robust to noise perturbation and computationally inexpensive.

Definition of diffusion maps Following and, diffusion maps can be defined in four steps.

Connectivity Diffusion maps exploit the relationship between heat diffusion and random walk Markov chain. The basic observation is that if we take a random walk on the data, walking to a nearby data-point is more likely than walking to another that is far away. Let (X,𝒜,μ) be a measure space, where X is the data set and μ represents the distribution of the points on X. Based on this, the connectivity k between two data points, x and y, can be defined as the probability of walking from x to y in one step of the random walk. Usually, this probability is specified in terms of a kernel function of the two points: k:X×X→ℝ. For example, the popular Gaussian kernel:

k(x,y)=exp⁡(−||x−y||2ϵ) More generally, the kernel function has the following properties

k is symmetric: k(x,y)=k(y,x), The kernel constitutes the prior definition of the local geometry of the data-set. Since a given kernel will capture a specific feature of the data set, its choice should be guided by the application that one has in mind. This is a major difference with methods such as principal component analysis, where correlations between all data points are taken into account at once. Given (X,k), we can then construct a reversible discrete-time Markov chain on X (a process known as the normalized graph Laplacian construction):

d(x)=∫Xk(x,y)dμ(y) and define:

p(x,y)=k(x,y)d(x) Although the new normalized kernel does not inherit the symmetric property, it does inherit the positivity-preserving property and gains a conservation property:

∫Xp(x,y)dμ(y)=1

Diffusion process From p(x,y) we can construct a transition matrix of a Markov chain (M) on X. In other words, p(x,y) represents the one-step transition probability from x to y, and Mt gives the t-step transition matrix. We define the diffusion matrix L (it is also a version of graph Laplacian matrix)

Li,j=k(xi,xj) We then define the new kernel

Li,j(α)=k(α)(xi,xj)=Li,j(d(xi)d(xj))α or equivalently,

L(α)=D−αLD−α where D is a diagonal matrix and Di,i=∑jLi,j. We apply the graph Laplacian normalization to this new kernel:

M=(D(α))−1L(α), where D(α) is a diagonal matrix and Di,i(α)=∑jLi,j(α).

p(xj,t|xi)=Mi,jt One of the main ideas of the diffusion framework is that running the chain forward in time (taking larger and larger powers of M) reveals the geometric structure of X at larger and larger scales (the diffusion process). Specifically, the notion of a cluster in the data set is quantified as a region in which the probability of escaping this region is low (within a certain time t). Therefore, t not only serves as a time parameter, but it also has the dual role of scale parameter. The eigendecomposition of the matrix Mt yields

Mi,jt=∑lλltψl(xi)ϕl(xj) where {λl} is the sequence of eigenvalues of M and {ψl} and {ϕl} are the biorthogonal left and right eigenvectors respectively. Due to the spectrum decay of the eigenvalues, only a few terms are necessary to achieve a given relative accuracy in this sum.

Parameter α and the diffusion operator The reason to introduce the normalization step involving α is to tune the influence of the data point density on the infinitesimal transition of the diffusion. In some applications, the sampling of the data is generally not related to the geometry of the manifold we are interested in describing. In this case, we can set α=1 and the diffusion operator approximates the Laplace–Beltrami operator. We then recover the Riemannian geometry of the data set regardless of the distribution of the points. To describe the long-term behavior of the point distribution of a system of stochastic differential equations, we can use α=0.5 and the resulting Markov chain approximates the Fokker–Planck diffusion. With α=0, it reduces to the classical graph Laplacian normalization.

Diffusion distance The diffusion distance at time t between two points can be measured as the similarity of two points in the observation space with the connectivity between them. It is given by

Dt(xi,xj)2=∑y(p(y,t|xi)−p(y,t|xj))2ϕ0(y) where ϕ0(y) is the stationary distribution of the Markov chain, given by the first left eigenvector of M. Explicitly:

ϕ0(y)=d(y)∑z∈Xd(z) Intuitively, Dt(xi,xj) is small if there is a large number of short paths connecting xi and xj. There are several interesting features associated with the diffusion distance, based on our previous discussion that t also serves as a scale parameter:

Points are closer at a given scale (as specified by Dt(xi,xj)) if they are highly connected in the graph, therefore emphasizing the concept of a cluster. This distance is robust to noise, since the distance between two points depends on all possible paths of length t between the points. From a machine learning point of view, the distance takes into account all evidences linking xi to xj, allowing us to conclude that this distance is appropriate for the design of inference algorithms based on the majority of preponderance.

Diffusion process and low-dimensional embedding The diffusion distance can be calculated using the eigenvectors by

Dt(xi,xj)2=∑lλl2t(ψl(xi)−ψl(xj))2 So the eigenvectors can be used as a new set of coordinates for the data. The diffusion map is defined as:

Ψt(x)=(λ1tψ1(x),λ2tψ2(x),…,λktψk(x)) Because of the spectrum decay, it is sufficient to use only the first k eigenvectors and eigenvalues. Thus we get the diffusion map from the original data to a k-dimensional space which is embedded in the original space. In it is proved that

… excerpt ends here. Continue reading the full article.

Illustrations

Diffusion map: Given non-uniformly sampled data points on a toroidal helix (top), the first two Diffusion Map coordinates with Laplace–Beltrami normalization are plotted (bottom). The Diffusion Map unravels the toroidal helix recovering the underlying intrinsic circular geometry of the data.
Given non-uniformly sampled data points on a toroidal helix (top), the first two Diffusion Map coordinates with Laplace–Beltrami normalization are plotted (bottom). The Diffusion Map unravels the toroidal helix recovering the underlying intrinsic circular geometry of the data.

Worked examples

Example 1 — a first encounter with Diffusion map

Start with the simplest possible case. Write down what Diffusion map claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Diffusion map before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Diffusion map ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Diffusion map

In research
Diffusion map appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Diffusion map in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Diffusion map is common in secondary-school and first-year university syllabi. It links to neighbouring topics Machine learning algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Diffusion map outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Diffusion map” →

How to study Diffusion map in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Diffusion map means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Diffusion map out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Diffusion map in simple terms?

Diffusion maps is a dimensionality reduction or feature extraction algorithm introduced by Coifman and Lafon which computes a family of embeddings of a data set into Euclidean space (often low-dimensional) whose coordinates can be computed from the eigenvectors and eigenvalues of a diffusion operat…

Why does Diffusion map matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Diffusion map?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Diffusion map.

Tags

  • Machine learning algorithms

Keep exploring