# 流形学习

流形学习是一类非线性降维方法，它将高维数据嵌入到低维空间中，使嵌入结果反映数据的内在结构而非环境坐标。其输出是每个数据点的一组低维坐标，用于可视化，并作为聚类等后续机器学习任务的预处理步骤。<sup>[1](https://www.nature.com/articles/s43586-024-00363-x)</sup> 该领域建立在流形假设之上：即假设 \(\mathbb{R}^D\) 中的数据点 \(x_i\) 位于或接近一个 \(d\) 维流形 \(M\)，其中 \(d \ll D\)。<sup>[2](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-040522-115238)</sup> 主要算法包括 [Isomap](https://www.edgepedia.org/zh/isomap)、[局部线性嵌入](https://www.edgepedia.org/zh/locally-linear-embedding)（LLE）、拉普拉斯特征映射、t-SNE 和 UMAP，许多方法共享一套基于图的通用流程。<sup>[3](https://jmlr.org/papers/volume22/20-1061/20-1061.pdf)</sup>

| 关键事实 | 详情 | 来源 |
|---|---|---|
| 流形假设 | 假设 \(\mathbb{R}^D\) 中的数据位于或接近一个 \(d\) 维流形；当 \(n \to \infty\) 时算法应收敛到光滑嵌入 | <sup>[2](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-040522-115238)</sup> |
| 产出什么 | 用于可视化和聚类等预处理任务的低维坐标 | <sup>[1](https://www.nature.com/articles/s43586-024-00363-x)</sup> |
| 通用流程 | 构建加权 k 近邻图，然后优化图上的损失函数以获得低维坐标 | <sup>[3](https://jmlr.org/papers/volume22/20-1061/20-1061.pdf)</sup> |
| Isomap 开销 | \(O(n^3)\) 时间和 \(O(n^2)\) 空间 | <sup>[2](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-040522-115238)</sup> |
| t-SNE 目标 | 在映射中使用 Student-t（Cauchy）亲和度的对称化 SNE 代价 | <sup>[4](http://www.cs.toronto.edu/%7Ehinton/absps/tsnefinal.pdf)</sup> |
| UMAP 目标 | 高维与低维模糊单纯集之间的交叉熵，用随机梯度下降优化 | <sup>[5](https://arxiv.org/pdf/1802.03426)</sup> |
| 关键超参数 | t-SNE 困惑度 \(k = 2^S\)；UMAP \(n_{\mathrm{neighbors}}\) 默认 15；UMAP min_dist 被描述为本质上是美学参数 | <sup>[6](https://sklearn.org/stable/modules/manifold.html)</sup><sup> • </sup><sup>[7](https://ar5iv.labs.arxiv.org/html/2109.02508)</sup><sup> • </sup><sup>[5](https://arxiv.org/pdf/1802.03426)</sup> |

## 工作原理

许多方法将高维距离转换为邻域图，然后优化该图上的损失函数以将点放置到低维空间中，但图构建、目标函数和求解过程因方法而异。<sup>[3](https://jmlr.org/papers/volume22/20-1061/20-1061.pdf)</sup> 它们的区别在于损失函数保留了什么几何结构。

**Isomap** 用邻域图中的最短路径距离替代[欧几里得距离](https://www.edgepedia.org/zh/euclidean-distance)，以近似流形上的测地距离，然后用经典多维缩放进行嵌入。<sup>[2](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-040522-115238)</sup> 在大样本极限下，只要流形与[欧几里得空间](https://www.edgepedia.org/zh/euclidean-space)的某个凸区域等距，且在定理条件下数据点对所选的邻域大小足够稠密，Isomap 在 \(m = d\) 时产生等距嵌入，<sup>[2](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-040522-115238)</sup> 并且 Bernstein 及其同事证明了该嵌入渐近恢复流形上的测地距离。<sup>[8](https://www.jmlr.org/papers/volume9/goldberg08a/goldberg08a.pdf)</sup>

**LLE** 保留局部几何：每个点由其邻居以权重 \(W_{ij}\) 重构，嵌入 \(Y\) 最小化 \(\Phi(Y) = \sum_i \lvert Y_i - \sum_j W_{ij} Y_j \rvert^2\)，由稀疏矩阵 \(M = (I - W)^{\mathrm{T}}(I - W)\) 的最小的 \(d+1\) 个特征值所对应的特征向量获得；该优化不涉及局部极小值。<sup>[9](https://doi.org/10.1126/science.290.5500.2323)</sup> **拉普拉斯特征映射**将图拉普拉斯 \(L = D - W\) 视为流形上 Laplace–Beltrami 算子的近似，求解广义特征问题 \(L y = \lambda D y\)，使用非平凡特征向量作为坐标。<sup>[10](https://papers.nips.cc/paper/2001/file/f106b7f99d2cb30c3db1c3cc0fde9ccb-Paper.pdf)</sup><sup> • </sup><sup>[11](https://doi.org/10.1162/089976603321780317)</sup>

**t-SNE** 将亲和度转换为概率：原始空间中的高斯联合概率和映射中自由度为一的 Student-t 分布（Cauchy 分布），通过梯度下降最小化对称化 SNE 代价。<sup>[4](http://www.cs.toronto.edu/%7Ehinton/absps/tsnefinal.pdf)</sup><sup> • </sup><sup>[6](https://sklearn.org/stable/modules/manifold.html)</sup> 重尾允许用大得多的映射距离来建模中等的高维距离，这消除了中等不相似点之间不期望的吸引力，并减少了映射中心的拥挤。<sup>[4](http://www.cs.toronto.edu/%7Ehinton/absps/tsnefinal.pdf)</sup> **UMAP** 则在 k 近邻图上构建模糊单纯集并最小化其交叉熵，\( \sum_{e \in E} w_h(e) \log\!\left(\frac{w_h(e)}{w_l(e)}\right) + (1 - w_h(e)) \log\!\left(\frac{1 - w_h(e)}{1 - w_l(e)}\right) \)，其中第一项吸引具有高维权重的点，第二项排斥不具有该权重的点。<sup>[5](https://arxiv.org/pdf/1802.03426)</sup><sup> • </sup><sup>[12](https://github.com/lmcinnes/umap/blob/master/doc/how_umap_works.rst)</sup> Ham、Lee、Mika 和 Schölkopf 证明了 Isomap、LLE 和拉普拉斯特征映射都可以描述为在特殊构造的 Gram 矩阵上的核 PCA，从而统一了基于特征向量的方法。<sup>[13](https://dl.acm.org/doi/10.1145/1015330.1015417)</sup>

## 如何实施

对于 t-SNE 和 UMAP 等方法，实际流程是：选择邻域大小、构建邻居图、初始化嵌入并运行梯度下降，而 Isomap、LLE 和拉普拉斯特征映射通常通过经典多维缩放或特征值问题获得嵌入。对于 t-SNE，核心选择是困惑度，定义为 \(k = 2^{S}\)，其中 \(S\) 是条件概率分布的香农熵；较大的困惑度考虑更多最近邻，较少关注小尺度结构。<sup>[6](https://sklearn.org/stable/modules/manifold.html)</sup> 对于 UMAP，类似参数是 `n_neighbors`，默认值为 15，它在细粒度与大尺度流形特征之间进行权衡；UMAP 经验上需要的邻居数少于 t-SNE。<sup>[5](https://arxiv.org/pdf/1802.03426)</sup><sup> • </sup><sup>[7](https://ar5iv.labs.arxiv.org/html/2109.02508)</sup> `min_dist` 参数控制点在映射中可以靠得多近；低值给出更密集的区域，更忠实地表示流形，高值使点分散，文档称其为本质上的美学参数。<sup>[5](https://arxiv.org/pdf/1802.03426)</sup>

初始化很重要：Kobak 和 Linderman 表明初始化严重影响投影的忠实度，并推荐对 t-SNE 和 UMAP 使用 PCA 初始化。<sup>[14](https://arxiv.org/html/2506.08725)</sup> UMAP 从归一化拉普拉斯的谱布局初始化，比 t-SNE 的随机初始化收敛更快、稳定性更好。<sup>[5](https://arxiv.org/pdf/1802.03426)</sup><sup> • </sup><sup>[15](https://www.mdpi.com/2227-7390/12/15/2388)</sup> 现在已有针对嵌入本身的诊断工具：scDEED 检测可疑的二维单细胞嵌入并优化 t-SNE 和 UMAP 超参数，<sup>[16](https://doi.org/10.1038/s41467-024-45891-y)</sup> LOO-map 框架分配逐点扰动和奇异性评分，标记不可靠的嵌入点。<sup>[17](https://www.nature.com/articles/s41467-025-60434-9)</sup>

## 起源

Isomap 由 Joshua B. Tenenbaum、Vin de Silva 和 John C. Langford 于 2000 年在《科学》上提出，论文报告了其三步形式以及对无孔、内在平坦流形的保证。<sup>[18](https://doi.org/10.1126/science.290.5500.2319)</sup><sup> • </sup><sup>[19](https://papers.nips.cc/paper_files/paper/1997/file/28e209b61a52482a0ae1cb9f5959c792-Paper.pdf)</sup> 局部线性嵌入由 Sam T. Roweis 和 Lawrence K. Saul 于 2000 年在《科学》上提出，与 Isomap 论文发表于同一期。<sup>[9](https://doi.org/10.1126/science.290.5500.2323)</sup> 拉普拉斯特征映射由 Mikhail Belkin 和 Partha Niyogi 于 2001 年在 NIPS 上提出，随后于 2003 年发表在《神经计算》上。<sup>[11](https://doi.org/10.1162/089976603321780317)</sup> 随机邻居嵌入作为 t-SNE 的前身，由 Geoffrey E. Hinton 和 Sam T. Roweis 于 2002 年提出，将邻域关系从硬 0–1 编码改为条件概率；t-SNE 本身由 [Laurens van der Maaten](https://www.edgepedia.org/zh/laurens-van-der-maaten) 和 Geoffrey E. Hinton 于 2008 年在《机器学习研究杂志》上提出，作为 SNE 的变体，更易于优化并减少拥挤。<sup>[4](http://www.cs.toronto.edu/%7Ehinton/absps/tsnefinal.pdf)</sup> UMAP 由 Leland McInnes 及其同事于 2018 年在《开源软件杂志》上提出，以黎曼几何和代数拓扑为框架。<sup>[5](https://arxiv.org/pdf/1802.03426)</sup><sup> • </sup><sup>[20](https://doi.org/10.21105/joss.00861)</sup>

## 变体

基于特征向量的家族迅速壮大：LTSA（Zhang 和 Zha，《SIAM 科学计算杂志》，2004）近似每个点的切空间并对齐切空间以构建全局坐标，<sup>[21](https://doi.org/10.1137/s1064827502419154)</sup> [扩散映射](https://www.edgepedia.org/zh/diffusion-maps)（Coifman 和 Lafon，2006）属于同一浪潮。<sup>[22](https://doi.org/10.1016/j.acha.2006.04.006)</sup> 在邻居嵌入方面，Barnes-Hut t-SNE（van der Maaten，2014）将嵌入空间分箱为单元，使排斥力在单元而非个体点上计算；<sup>[23](https://doi.org/10.5555/2627435.2697068)</sup> FIt-SNE（Linderman 及其同事，《自然方法》，2019）将嵌入空间划分为网格，并使用傅里叶插值在网格上计算排斥力，实现与样本数成正比的时间复杂度；<sup>[24](https://doi.org/10.1038/s41592-018-0308-4)</sup> openTSNE（Poličar、Strazar 和 Zupan，《统计软件杂志》，2024）是一个模块化 Python 库，实现了两种近似，并且是唯一以有理论依据的方式向现有嵌入添加新样本的公开库。<sup>[25](https://doi.org/10.18637/jss.v109.i03)</sup> 参数化 t-SNE 在 t-SNE 目标上训练前馈神经网络。<sup>[26](http://proceedings.mlr.press/v5/maaten09a/maaten09a.pdf)</sup> 参数化 UMAP（Sainburg、McInnes 和 Gentner，《神经计算》，2021）用神经网络权重的优化替代 UMAP 的嵌入优化步骤，在相似嵌入质量下将推理时间缩短数个数量级。<sup>[27](https://doi.org/10.1162/neco_a_01434)</sup> DensMAP 正则化 UMAP 的代价以保留局部密度信息，渐进式 UMAP 支持样本外和流数据。<sup>[7](https://ar5iv.labs.arxiv.org/html/2109.02508)</sup> TriMap（Amid 和 Warmuth，2019）使用三元组约束，<sup>[28](https://doi.org/10.48550/arxiv.1910.00204)</sup> PaCMAP（Wang 及其同事）结合邻居、中近和更远点对项以同时保留局部和全局结构，<sup>[3](https://jmlr.org/papers/volume22/20-1061/20-1061.pdf)</sup> GPU 加速 UMAP（Nolet 及其同事，2020）面向大规模性能。<sup>[29](https://doi.org/10.13016/m2sqzx-hybf)</sup>

## 应用

在单细胞 RNA 测序中，PCA、然后邻域图、然后 Leiden 聚类和 UMAP 的流程已成为事实标准，被 Scanpy 和 Seurat 采用。<sup>[30](https://elifesciences.org/articles/100361)</sup> FIt-SNE 专门为改进单细胞 RNA 测序数据的可视化而开发。<sup>[24](https://doi.org/10.1038/s41592-018-0308-4)</sup> t-SNE 广泛用于生物信息学，包括单细胞转录组学、人类遗传学、宏基因组组装和代谢组学。<sup>[25](https://doi.org/10.18637/jss.v109.i03)</sup> 除了绘图之外，这些方法还作为聚类的预处理，<sup>[1](https://www.nature.com/articles/s43586-024-00363-x)</sup> 参数化 UMAP 学习用于表示和半监督学习的显式映射。<sup>[27](https://doi.org/10.1162/neco_a_01434)</sup>

## 局限与替代方案

所有流形学习算法除特殊情况外都会扭曲距离，并且都依赖于内在维度、嵌入维度和邻域尺度等超参数；忽视统计一致性可能产生当 \(n \to \infty\) 时没有极限的方法（无正则化的 LLE）以及数据中无对应物的伪影，如簇、臂和马蹄形。<sup>[2](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-040522-115238)</sup> t-SNE 可能对困惑度参数非常敏感并产生虚假簇。<sup>[3](https://jmlr.org/papers/volume22/20-1061/20-1061.pdf)</sup> 2025 年的一篇批评补充说，t-SNE 和 UMAP 不能准确表示点间距离等全局结构，却常被用于研究点或簇之间的不相似性，并被广泛报道夸大类别分离。<sup>[14](https://arxiv.org/html/2506.08725)</sup> 更深层的批评涉及解释：邻居嵌入缺乏全局定义的、数据无关的嵌入映射，不同于 PCA 的显式参数映射，映射连续性分析得出结论，这些方法的流形学习解释是不准确的。<sup>[17](https://www.nature.com/articles/s41467-025-60434-9)</sup>

扩展极限差异显著。Isomap 花费 \(O(n^3)\) 时间和 \(O(n^2)\) 空间；<sup>[2](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-040522-115238)</sup> 标准 t-SNE 具有平方级的计算和内存复杂度，使其在超过约 10,000 个点时不可行；<sup>[4](http://www.cs.toronto.edu/%7Ehinton/absps/tsnefinal.pdf)</sup> Barnes-Hut t-SNE 将梯度计算降至 \(O(d \cdot N \log N)\) 并可扩展到数十万个点，而精确方法仅能处理数千个。<sup>[6](https://sklearn.org/stable/modules/manifold.html)</sup> UMAP 使用近似最近邻下降，报告的经验复杂度为 \(O(N^{1.14})\)，优化扩展为 \(O(k \cdot N)\)。<sup>[5](https://arxiv.org/pdf/1802.03426)</sup> 关于全局结构的问题，Wang 及其同事发现 t-SNE 和 UMAP 都很好地保留局部结构但在全局结构上表现不佳，且两者都无法通过任何明显的参数变化从局部保留平滑调整到全局保留。<sup>[3](https://jmlr.org/papers/volume22/20-1061/20-1061.pdf)</sup> 在方法选择方面，一项适用性分析发现 t-SNE 和 UMAP 在识别任务上表现更好，而 PCA 和 MDS 擅长点距离、簇距离和簇密度等研究任务；t-SNE 和 UMAP 对簇密度的表示较差，den-SNE 和 densMAP 被提出作为替代方案。<sup>[14](https://arxiv.org/html/2506.08725)</sup> 在单细胞场景中，权衡是双向的：PCA 通常在那里解释不到 40% 的方差，在流形学习开始之前就丢弃了大量信号。<sup>[30](https://elifesciences.org/articles/100361)</sup>

## References

1. [Uniform manifold approximation and projection | Nature Reviews Methods Primers (2024)](https://www.nature.com/articles/s43586-024-00363-x)
2. [Manifold Learning: What, How, and Why (Meilă & Zhang, Annual Review of Statistics and Its Application, 2024)](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-040522-115238)
3. [Understanding How Dimension Reduction Tools Work: An Empirical Approach to Deciphering t-SNE, UMAP, TriMap, and PaCMAP (Wang et al., JMLR 2021)](https://jmlr.org/papers/volume22/20-1061/20-1061.pdf)
4. [Visualizing Data using t-SNE (van der Maaten & Hinton, JMLR 2008)](http://www.cs.toronto.edu/%7Ehinton/absps/tsnefinal.pdf)
5. [UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction (McInnes, Healy, Melville, 2018)](https://arxiv.org/pdf/1802.03426)
6. [2.2. Manifold learning, scikit-learn documentation](https://sklearn.org/stable/modules/manifold.html)
7. [Uniform Manifold Approximation and Projection (UMAP) and its Variants: Tutorial and Survey (Ghojogh et al.)](https://ar5iv.labs.arxiv.org/html/2109.02508)
8. [Manifold Learning: The Price of Normalization (Goldberg et al., JMLR 2008)](https://www.jmlr.org/papers/volume9/goldberg08a/goldberg08a.pdf)
9. [Sam T. Roweis, Lawrence K. Saul (2000). Nonlinear Dimensionality Reduction by Locally Linear Embedding. Science.](https://doi.org/10.1126/science.290.5500.2323)
10. [Laplacian Eigenmaps and Spectral Techniques for Embedding and Clustering (Belkin & Niyogi, NIPS 2001)](https://papers.nips.cc/paper/2001/file/f106b7f99d2cb30c3db1c3cc0fde9ccb-Paper.pdf)
11. [Mikhail Belkin, Partha Niyogi (2003). Laplacian Eigenmaps for Dimensionality Reduction and Data Representation. Neural Computation.](https://doi.org/10.1162/089976603321780317)
12. [How UMAP Works (official documentation, lmcinnes/umap)](https://github.com/lmcinnes/umap/blob/master/doc/how_umap_works.rst)
13. [A kernel view of the dimensionality reduction of manifolds (Ham et al., ICML 2004)](https://dl.acm.org/doi/10.1145/1015330.1015417)
14. [Stop Misusing t-SNE and UMAP for Visual Analytics (arXiv, 2025)](https://arxiv.org/html/2506.08725)
15. [Comparative Analysis of Manifold Learning-Based Dimension Reduction Methods: A Mathematical Perspective (Mathematics, MDPI, 2024)](https://www.mdpi.com/2227-7390/12/15/2388)
16. [Lucy Xia, Christy Lee, Jingyi Jessica Li (2024). Statistical method scDEED for detecting dubious 2D single-cell embeddings and optimizing t-SNE and UMAP hyperparameters. Nature Communications.](https://doi.org/10.1038/s41467-024-45891-y)
17. [Assessing and improving reliability of neighbor embedding methods: a map-continuity perspective (Nature Communications, 2025)](https://www.nature.com/articles/s41467-025-60434-9)
18. [Joshua B. Tenenbaum, Vin de Silva, John C. Langford (2000). A Global Geometric Framework for Nonlinear Dimensionality Reduction. Science.](https://doi.org/10.1126/science.290.5500.2319)
19. [Mapping a Manifold of Perceptual Observations (Tenenbaum, NIPS 1997)](https://papers.nips.cc/paper_files/paper/1997/file/28e209b61a52482a0ae1cb9f5959c792-Paper.pdf)
20. [Leland McInnes and colleagues (2018). UMAP: Uniform Manifold Approximation and Projection. The Journal of Open Source Software.](https://doi.org/10.21105/joss.00861)
21. [Zhenyue Zhang, Hongyuan Zha (2004). Principal Manifolds and Nonlinear Dimensionality Reduction via Tangent Space Alignment. SIAM Journal on Scientific Computing.](https://doi.org/10.1137/s1064827502419154)
22. [Ronald R. Coifman, Stéphane Lafon (2006). Diffusion maps. Applied and Computational Harmonic Analysis.](https://doi.org/10.1016/j.acha.2006.04.006)
23. [Laurens van der Maaten (2014). Accelerating t-SNE using tree-based algorithms. .](https://doi.org/10.5555/2627435.2697068)
24. [George C. Linderman and colleagues (2019). Fast interpolation-based t-SNE for improved visualization of single-cell RNA-seq data. Nature Methods.](https://doi.org/10.1038/s41592-018-0308-4)
25. [Pavlin G. Policar, Martin Strazar, Blaz Zupan (2024). openTSNE : A Modular Python Library for t-SNE Dimensionality Reduction and Embedding. Journal of Statistical Software.](https://doi.org/10.18637/jss.v109.i03)
26. [Learning a Parametric Embedding by Preserving Local Structure (parametric t-SNE, AISTATS 2009)](http://proceedings.mlr.press/v5/maaten09a/maaten09a.pdf)
27. [Tim Sainburg, Leland McInnes, Timothy Q. Gentner (2021). Parametric UMAP Embeddings for Representation and Semisupervised Learning. Neural Computation.](https://doi.org/10.1162/neco_a_01434)
28. [Amid, Ehsan, Warmuth, Manfred K. (2019). TriMap: Large-scale Dimensionality Reduction Using Triplets. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1910.00204)
29. [Nolet, Corey J. and colleagues (2020). Bringing UMAP Closer to the Speed of Light with GPU Acceleration. arXiv (Cornell University).](https://doi.org/10.13016/m2sqzx-hybf)
30. [TopoMetry systematically learns and evaluates the latent geometry of single-cell data (eLife, 2025)](https://elifesciences.org/articles/100361)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026; Oct 25, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Machine learning and neural computation › Machine learning methods › Supervised, unsupervised, and semi-supervised learning › Dimensionality reduction and manifold learning

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/manifold-learning

English original: https://www.edgepedia.org/manifold-learning
