Diffusion map

From HandWiki
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.

Diffusion maps is a dimensionality reduction or feature extraction algorithm introduced by Coifman and Lafon[1][2][3][4] 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 [3] and,[5] 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 [math]\displaystyle{ (X, \mathcal{A}, \mu) }[/math] be a measure space, where [math]\displaystyle{ X }[/math] is the data set and [math]\displaystyle{ \mu }[/math] represents the distribution of the points on [math]\displaystyle{ X }[/math].

Based on this, the connectivity [math]\displaystyle{ k }[/math] between two data points, [math]\displaystyle{ x }[/math] and [math]\displaystyle{ y }[/math], can be defined as the probability of walking from [math]\displaystyle{ x }[/math] to [math]\displaystyle{ y }[/math] in one step of the random walk. Usually, this probability is specified in terms of a kernel function of the two points: [math]\displaystyle{ k: X \times X \rightarrow \mathbb{R} }[/math]. For example, the popular Gaussian kernel:

[math]\displaystyle{ k(x,y)=\exp\left(-\frac{||x-y||^2}{\epsilon}\right) }[/math]

More generally, the kernel function has the following properties

[math]\displaystyle{ k(x,y) = k(y,x) }[/math]

([math]\displaystyle{ k }[/math] is symmetric)

[math]\displaystyle{ k(x,y) \geq 0 \,\,\forall x,y }[/math]

([math]\displaystyle{ k }[/math] is positivity preserving).

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 [math]\displaystyle{ (X, k) }[/math], we can then construct a reversible discrete-time Markov chain on [math]\displaystyle{ X }[/math] (a process known as the normalized graph Laplacian construction):

[math]\displaystyle{ d(x) = \int_X k(x,y) d\mu(y) }[/math]

and define:

[math]\displaystyle{ p(x,y) = \frac{k(x,y)}{d(x)} }[/math]

Although the new normalized kernel does not inherit the symmetric property, it does inherit the positivity-preserving property and gains a conservation property:

[math]\displaystyle{ \int_X p(x,y) d\mu(y) = 1 }[/math]

Diffusion process

From [math]\displaystyle{ p(x,y) }[/math] we can construct a transition matrix of a Markov chain ([math]\displaystyle{ M }[/math]) on [math]\displaystyle{ X }[/math]. In other words, [math]\displaystyle{ p(x,y) }[/math] represents the one-step transition probability from [math]\displaystyle{ x }[/math] to [math]\displaystyle{ y }[/math], and [math]\displaystyle{ M^t }[/math] gives the t-step transition matrix.

We define the diffusion matrix [math]\displaystyle{ L }[/math] (it is also a version of graph Laplacian matrix)

[math]\displaystyle{ L_{i,j}=k(x_i,x_j) \, }[/math]

We then define the new kernel

[math]\displaystyle{ L^{(\alpha)}_{i,j}= k^{(\alpha)}(x_i,x_j) =\frac{L_{i,j}}{(d(x_i) d(x_j))^{\alpha}} \, }[/math]

or equivalently,

[math]\displaystyle{ L^{(\alpha)} = D^{-\alpha} L D^{-\alpha} \, }[/math]

where D is a diagonal matrix and [math]\displaystyle{ D_{i, i} = \sum_j L_{i, j}. }[/math]

We apply the graph Laplacian normalization to this new kernel:

[math]\displaystyle{ M=({D}^{(\alpha)})^{-1}L^{(\alpha)}, \, }[/math]

where [math]\displaystyle{ D^{(\alpha)} }[/math] is a diagonal matrix and [math]\displaystyle{ {D}^{(\alpha)}_{i, i} = \sum_j L^{(\alpha)}_{i, j}. }[/math]

[math]\displaystyle{ p(x_j,t|x_i)=M^t_{i,j} \, }[/math]

One of the main ideas of the diffusion framework is that running the chain forward in time (taking larger and larger powers of [math]\displaystyle{ M }[/math]) reveals the geometric structure of [math]\displaystyle{ X }[/math] 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 [math]\displaystyle{ M^t }[/math] yields

[math]\displaystyle{ M^t_{i,j} = \sum_l \lambda_l^t \psi_l(x_i)\phi_l(x_j) \, }[/math]

where [math]\displaystyle{ \{\lambda_l \} }[/math] is the sequence of eigenvalues of [math]\displaystyle{ M }[/math] and [math]\displaystyle{ \{\psi_l \} }[/math] and [math]\displaystyle{ \{\phi_l \} }[/math] are the biorthogonal right and left 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 [math]\displaystyle{ \alpha }[/math] 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 [math]\displaystyle{ \alpha=1 }[/math] 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 [math]\displaystyle{ \alpha=0.5 }[/math] and the resulting Markov chain approximates the Fokker–Planck diffusion. With [math]\displaystyle{ \alpha=0 }[/math], it reduces to the classical graph Laplacian normalization.

Diffusion distance

The diffusion distance at time [math]\displaystyle{ t }[/math] 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

[math]\displaystyle{ D_{t}(x_i,x_j)^2 =\sum_y \frac{(p(y,t|x_i)-p(y,t|x_j))^2}{\phi_0(y)} }[/math]

where [math]\displaystyle{ \phi_0(y) }[/math] is the stationary distribution of the Markov chain, given by the first left eigenvector of [math]\displaystyle{ M }[/math]. Explicitly:

[math]\displaystyle{ \phi_0(y) = \frac{d(y)}{\sum_{z \in X} d(z)} }[/math]

Intuitively, [math]\displaystyle{ D_t(x_i,x_j) }[/math] is small if there is a large number of short paths connecting [math]\displaystyle{ x_i }[/math] and [math]\displaystyle{ x_j }[/math]. There are several interesting features associated with the diffusion distance, based on our previous discussion that [math]\displaystyle{ t }[/math] also serves as a scale parameter:

  1. Points are closer at a given scale (as specified by [math]\displaystyle{ D_t(x_i,x_j) }[/math]) if they are highly connected in the graph, therefore emphasizing the concept of a cluster.
  2. This distance is robust to noise, since the distance between two points depends on all possible paths of length [math]\displaystyle{ t }[/math] between the points.
  3. From a machine learning point of view, the distance takes into account all evidences linking [math]\displaystyle{ x_i }[/math] to [math]\displaystyle{ x_j }[/math], allowing us to conclude that this distance is appropriate for the design of inference algorithms based on the majority of preponderance.[3]

Diffusion process and low-dimensional embedding

The diffusion distance can be calculated using the eigenvectors by

[math]\displaystyle{ D_t(x_i,x_j)^2=\sum_l \lambda_l^{2t} (\psi_l(x_i)-\psi_l(x_j))^2 \, }[/math]

So the eigenvectors can be used as a new set of coordinates for the data. The diffusion map is defined as:

[math]\displaystyle{ \Psi_t(x)=(\lambda_1^t\psi_1(x),\lambda_2^t\psi_2(x),\ldots,\lambda_k^t\psi_k(x)) }[/math]

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 [6] it is proved that

[math]\displaystyle{ D_t(x_i,x_j)^2 \approx||\Psi_t(x_i)-\Psi_t(x_j)||^2 \, }[/math]

so the Euclidean distance in the diffusion coordinates approximates the diffusion distance.

Algorithm

The basic algorithm framework of diffusion map is as:

Step 1. Given the similarity matrix L.

Step 2. Normalize the matrix according to parameter [math]\displaystyle{ \alpha }[/math]: [math]\displaystyle{ L^{(\alpha)} = D^{-\alpha} L D^{-\alpha} }[/math].

Step 3. Form the normalized matrix [math]\displaystyle{ M=({D}^{(\alpha)})^{-1}L^{(\alpha)} }[/math].

Step 4. Compute the k largest eigenvalues of [math]\displaystyle{ M^t }[/math] and the corresponding eigenvectors.

Step 5. Use diffusion map to get the embedding [math]\displaystyle{ \Psi_t }[/math].

Application

In the paper [6] Nadler et al. showed how to design a kernel that reproduces the diffusion induced by a Fokker–Planck equation. They also explained that, when the data approximate a manifold, one can recover the geometry of this manifold by computing an approximation of the Laplace–Beltrami operator. This computation is completely insensitive to the distribution of the points and therefore provides a separation of the statistics and the geometry of the data. Since diffusion maps give a global description of the data-set, they can measure the distances between pairs of sample points in the manifold in which the data is embedded. Applications based on diffusion maps include face recognition,[7] spectral clustering, low dimensional representation of images, image segmentation,[8] 3D model segmentation,[9] speaker verification[10] and identification,[11] sampling on manifolds, anomaly detection,[12][13] image inpainting,[14] revealing brain resting state networks organization [15] and so on.

Furthermore, the diffusion maps framework has been productively extended to complex networks,[16] revealing a functional organisation of networks which differs from the purely topological or structural one.

See also

References

  1. Coifman, R.R.; Lafon, S; Lee, A B; Maggioni, M; Nadler, B; Warner, F; Zucker, S W (2005). "Geometric diffusions as a tool for harmonic analysis and structure definition of data: Diffusion maps". PNAS 102 (21): 7426–7431. doi:10.1073/pnas.0500334102. PMID 15899970. Bibcode2005PNAS..102.7426C. 
  2. Coifman, R.R.; Lafon, S; Lee, A B; Maggioni, M; Nadler, B; Warner, F; Zucker, S W (2005). "Geometric diffusions as a tool for harmonic analysis and structure definition of data: Multiscale methods". PNAS 102 (21): 7432–7437. doi:10.1073/pnas.0500896102. PMID 15899969. Bibcode2005PNAS..102.7432C. 
  3. 3.0 3.1 3.2 Coifman, R.R.; S. Lafon. (2006). "Diffusion maps". Applied and Computational Harmonic Analysis 21: 5–30. doi:10.1016/j.acha.2006.04.006. 
  4. Lafon, S.S. (2004). Diffusion Maps and Geometric Harmonics (PDF) (PhD). Yale University.
  5. De la Porte, J.; Herbst, B M; Hereman, W; Van der Walt, S J (2008). "An Introduction to Diffusion Maps". Proceedings of the Nineteenth Annual Symposium of the Pattern Recognition Association of South Africa (PRASA). 
  6. 6.0 6.1 Nadler, Boaz; Stéphane Lafon; Ronald R. Coifman; Ioannis G. Kevrekidis (2005). "Diffusion Maps, Spectral Clustering and Eigenfunctions of Fokker–Planck Operators". Advances in Neural Information Processing Systems 18. Bibcode2005math......6090N. http://www.wisdom.weizmann.ac.il/~nadler/Publications/dm_nips05.pdf. 
  7. Barkan, Oren; Weill, Jonathan; Wolf, Lior; Aronowitz, Hagai. "Fast high dimensional vector multiplication face recognition". Proceedings of the IEEE International Conference on Computer Vision 2013: 1960–1967. http://www.cv-foundation.org/openaccess/content_iccv_2013/papers/Barkan_Fast_High_Dimensional_2013_ICCV_paper.pdf. 
  8. Zeev, Farbman; Fattal Raanan; Lischinski Dani (2010). "Diffusion maps for edge-aware image editing". ACM Trans. Graph. 29 (6): 145:1–145:10. doi:10.1145/1882261.1866171. 
  9. Oana, Sidi; van Kaick, Oliver; Kleiman, Yanir; Zhang, Hao; Cohen-Or, Daniel (2011). "Unsupervised Co-Segmentation of a Set of Shapes via Descriptor-Space Spectral Clustering". https://www.cs.sfu.ca/~haoz/pubs/sidi_siga11_coseg.pdf. 
  10. Barkan, Oren; Aronowitz, Hagai (2013). "Diffusion maps for PLDA-based speaker verification". Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP): 7639–7643. http://smartfp7.eu/sites/default/files/field/files/page/DIFFUSION%20MAPS%20FOR%20PLDA-BASED%20SPEAKER%20VERIFICATION.pdf. 
  11. Michalevsky, Yan; Talmon, Ronen; Cohen, Israel (2011). "Speaker Identification Using Diffusion Maps". European signal processing conference 2011. http://www.eurasip.org/Proceedings/Eusipco/Eusipco2011/papers/1569414913.pdf. 
  12. Mishne, Gal; Cohen, Israel (2013). "Multiscale Anomaly Detection Using Diffusion Maps". IEEE Selected Topics in Signal Processing 7 (1): 111–123. doi:10.1109/jstsp.2012.2232279. Bibcode2013ISTSP...7..111M. 
  13. Shabat, Gil; Segev, David; Averbuch, Amir (2018-01-07). "Uncovering Unknown Unknowns in Financial Services Big Data by Unsupervised Methodologies: Present and Future trends" (in en). KDD 2017 Workshop on Anomaly Detection in Finance 71: 8–19. http://proceedings.mlr.press/v71/shabat18a.html. 
  14. Gepshtein, Shai; Keller, Yosi (2013). "Image Completion by Diffusion Maps and Spectral Relaxation". IEEE Transactions on Image Processing 22 (8): 2983–2994. doi:10.1109/tip.2013.2237916. PMID 23322762. Bibcode2013ITIP...22.2983G. 
  15. Margulies, Daniel S.; Ghosh, Satrajit S.; Goulas, Alexandros; Falkiewicz, Marcel; Huntenburg, Julia M.; Langs, Georg; Bezgin, Gleb; Eickhoff, Simon B. et al. (2016). "Situating the default-mode network along a principal gradient of macroscale cortical organization". Proceedings of the National Academy of Sciences 113 (44): 12574–12579. doi:10.1073/pnas.1608282113. PMID 27791099. Bibcode2016PNAS..11312574M. 
  16. De Domenico, Manlio (2017). "Diffusion geometry unravels the emergence of functional clusters in collective phenomena". Physical Review Letters 118 (16): 168301. doi:10.1103/PhysRevLett.118.168301. PMID 28474920. Bibcode2017PhRvL.118p8301D. https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.118.168301.