# 非线性降维

非线性降维是一类机器学习方法，它将高维数据转换为低维表示，同时保留线性投影所遗漏的结构，例如弯曲流形和邻域关系。其输出可用于可视化，也可作为聚类等后续机器学习任务的预处理步骤。<sup>[1](https://www.nature.com/articles/s43586-024-00363-x)</sup> 广泛使用的邻域嵌入方法 t-SNE 和 UMAP 会构建数据的概率表示或图表示，并优化低维布局使其与之一致。<sup>[2](https://doi.org/10.48550/arxiv.2012.04456)</sup><sup> • </sup><sup>[3](https://doi.org/10.48550/arxiv.1802.03426)</sup>

| 关键事实 | 详情 |
|---|---|
| 用途 | 用于可视化的低维坐标，以及用于聚类和其他学习任务的预处理<sup>[1](https://www.nature.com/articles/s43586-024-00363-x)</sup> |
| t-SNE 目标 | 最小化整个归一化成对相似度矩阵的 KL 散度；重尾低维核可缓解拥挤<sup>[4](https://doi.org/10.48550/arxiv.2305.07320)</sup><sup> • </sup><sup>[2](https://doi.org/10.48550/arxiv.2012.04456)</sup> |
| UMAP 目标 | 最小化高维与低维数据的模糊单纯集（图）表示之间的交叉熵<sup>[3](https://doi.org/10.48550/arxiv.1802.03426)</sup> |
| t-SNE 的可扩展性 | Barnes-Hut t-SNE 仅需 \( O(N \log N) \) 计算量和 \( O(N) \) 内存，可在 751 秒内嵌入全部 70,000 个 MNIST 数字<sup>[5](https://lvdmaaten.github.io/publications/papers/JMLR_2014.pdf)</sup> |
| UMAP 的可扩展性 | 通过最近邻下降进行近似 k 近邻搜索，报告的经验复杂度为 \( O(N^{1.14}) \)<sup>[3](https://doi.org/10.48550/arxiv.1802.03426)</sup> |
| 二维映射的保真度 | 所有二维方法的 kNN 召回率均低于 40%，与环境维邻居的 Jaccard 距离平均高于 0.7<sup>[6](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1012403)</sup><sup> • </sup><sup>[7](https://doi.org/10.1371/journal.pcbi.1011288)</sup> |
| GPU 规模 | 多 GPU cuML UMAP 在 8 分钟内嵌入了 1.06 亿向量的 MIRACL 数据集，在八块 H100 GPU 上实现最高 74 倍的端到端加速<sup>[8](https://developer.nvidia.com/blog/run-massive-scale-umap-in-minutes-using-multiple-gpus-without-losing-accuracy/)</sup> |

## 工作原理

大多数方法基于这样一个理念：高维观测数据位于低维流形附近，因此嵌入应保留邻域结构或测地结构，而非全局直线距离。一篇比较性综述将该领域分为全局技术与局部结构保持技术，前者保留数据的全局性质（MDS、Isomap、MVU、扩散映射、核 PCA 和多层自编码器）。<sup>[9](http://faculty.ist.psu.edu/vhonavar/Courses/dsmethods/dim1.pdf)</sup>

Isomap 保留测地距离，即沿观测流形而非穿过环境空间测量的点间距离。<sup>[10](https://doi.org/10.1126/science.290.5500.2319)</sup> LLE 则利用线性重构的局部对称性来学习非线性流形的全局结构；其优化可归结为稀疏特征值问题，且不涉及局部极小值。<sup>[11](https://doi.org/10.1126/science.290.5500.2323)</sup><sup> • </sup><sup>[12](https://jmlr.org/papers/volume4/saul03a/saul03a.pdf)</sup> Isomap、图拉普拉斯特征映射和 LLE 都利用局部邻域信息构建全局嵌入，并可在统一的核方法框架内描述。<sup>[13](https://dl.acm.org/doi/10.1145/1015330.1015417)</sup>

邻域嵌入路线的工作方式不同。SNE 将欧几里得距离转换为表示相似度的条件概率；t-SNE 通过在低维空间中以长尾分布替代高斯分布，解决了拥挤问题，即点倾向于聚集在映射中心的现象。<sup>[2](https://doi.org/10.48550/arxiv.2012.04456)</sup> t-SNE 最小化整个归一化成对相似度矩阵的 KL 散度，而 UMAP 对 \( n^2 \) 个伯努利成对分布的 KL 散度求和；归一化这一单一参数决定了二者之间的切换。<sup>[4](https://doi.org/10.48550/arxiv.2305.07320)</sup> UMAP 从局部模糊单纯集构建数据的拓扑表示，并通过最小化高维与低维表示之间的交叉熵来优化低维布局。<sup>[3](https://doi.org/10.48550/arxiv.1802.03426)</sup> 其交叉熵目标是成对伯努利 KL 散度之和，但与 t-SNE 在全局归一化联合相似度分布之间的 KL 散度是不同的损失；差异在于分布的归一化方式。<sup>[14](https://link.springer.com/chapter/10.1007/978-3-031-97973-6_5)</sup>

## 实现方法

UMAP 分两个阶段运行：在高维空间中构建图（寻找 k 个最近邻并计算每个观测的 \( \rho_{i} \) 和 \( \sigma_{i} \) 值），以及优化低维图布局。<sup>[2](https://doi.org/10.48550/arxiv.2012.04456)</sup> 近似 k 近邻计算使用最近邻下降算法，优化时沿图边施加吸引力，对随机采样的非邻接顶点施加排斥力，采用与 word2vec 和 LargeVis 相同的负采样方法。<sup>[3](https://doi.org/10.48550/arxiv.1802.03426)</sup><sup> • </sup><sup>[15](https://umap-learn.readthedocs.io/en/latest/how%5Fumap%5Fworks.html)</sup> 标准初始化是在对称化模糊权重矩阵上使用拉普拉斯特征映射，这可能带来更好的极小值，但没有理论保证。<sup>[14](https://link.springer.com/chapter/10.1007/978-3-031-97973-6_5)</sup>

主要超参数是邻居数、min_dist（控制 UMAP 在低维布局中允许点聚集的紧密程度，而非对所有成对距离施加严格下界），以及 t-SNE 的困惑度（大致控制有效邻居数的 t-SNE 设置）。UMAP 的作者将 min_dist 视为本质上影响嵌入外观的美学参数。<sup>[3](https://doi.org/10.48550/arxiv.1802.03426)</sup> 参考实现 umap-learn 与 scikit-learn 兼容，支持监督和半监督降维，并可将新的未见数据变换到预训练的嵌入空间；它比大多数 t-SNE 实现显著更快。<sup>[16](https://doi.org/10.21105/joss.00861)</sup> cuML 中提供了带 Python 封装的 GPU 实现，<sup>[17](https://proceedings.mlsys.org/paper_files/paper/2026/file/0badcb4e95306df76a719409155e46e8-Paper-Conference.pdf)</sup> cuML 25.06 在八块 H100 GPU 上于 8 分钟内嵌入了 1.06 亿向量、2048 维的 MIRACL 数据集，相比预计的 CPU 运行时间实现最高 74 倍的端到端加速。<sup>[8](https://developer.nvidia.com/blog/run-massive-scale-umap-in-minutes-using-multiple-gpus-without-losing-accuracy/)</sup>

## 起源

Isomap 由 Joshua B. Tenenbaum、Vin de Silva 和 John C. Langford 于 2000 年在《Science》上提出，作为非线性降维的全局几何框架。<sup>[10](https://doi.org/10.1126/science.290.5500.2319)</sup> 同年，Sam T. Roweis 和 Lawrence K. Saul 在《Science》上提出了 LLE。<sup>[11](https://doi.org/10.1126/science.290.5500.2323)</sup> Geoffrey E. Hinton 和 Sam T. Roweis 于 2002 年提出了随机邻域嵌入，即 t-SNE 的直接前身。<sup>[2](https://doi.org/10.48550/arxiv.2012.04456)</sup> Mikhail Belkin 和 Partha Niyogi 于 2002 年提出了拉普拉斯特征映射，<sup>[18](https://doi.org/10.7551/mitpress/1120.003.0080)</sup> Ronald R. Coifman 和 Stéphane Lafon 于 2006 年提出了扩散映射。<sup>[19](https://doi.org/10.1016/j.acha.2006.04.006)</sup> t-SNE 由 [Laurens van der Maaten](https://www.edgepedia.org/zh/laurens-van-der-maaten) 和 Geoffrey E. Hinton 于 2008 年在《Journal of Machine Learning Research》上提出。<sup>[2](https://doi.org/10.48550/arxiv.2012.04456)</sup> UMAP 由 Leland McInnes、John Healy 和 James Melville 在 2018 年的 arXiv 论文中提出。<sup>[3](https://doi.org/10.48550/arxiv.1802.03426)</sup> 其在单细胞生物学中的采用紧随其后：Etienne Becht 及其同事同年在《Nature Biotechnology》上发表了用于单细胞数据的 UMAP 工作流程。<sup>[20](https://doi.org/10.1038/nbt.4314)</sup>

## 变体

t-SNE 的实现变体提高了速度或可用性：Barnes-Hut t-SNE 使用基于树的算法，<sup>[5](https://lvdmaaten.github.io/publications/papers/JMLR_2014.pdf)</sup> viSNE 将 t-SNE 引入单细胞测量术，<sup>[21](https://doi.org/10.1038/nbt.2594)</sup> FIt-SNE 引入了更快的嵌入算法。<sup>[22](https://doi.org/10.48550/arxiv.1712.09005)</sup> TriMap 使用三元组进行大规模降维，<sup>[23](https://doi.org/10.48550/arxiv.1910.00204)</sup> PaCMAP（成对受控流形近似投影）是后来的成对受控设计。<sup>[2](https://doi.org/10.48550/arxiv.2012.04456)</sup> 综述文献还描述了将局部密度信息重新加入 UMAP 代价的变体，以及可嵌入样本外数据的流式变体，原始 UMAP 通过其变换过程支持样本外数据的嵌入。<sup>[24](https://ar5iv.labs.arxiv.org/html/2109.02508)</sup><sup> • </sup><sup>[33](https://umap-learn.readthedocs.io/en/latest/transform_landmarked_pumap.html)</sup>

**参数化 UMAP** 取代了 UMAP 的第二步，最小化相同的目标函数，但用神经网络学习数据与嵌入之间的关系，而非直接学习嵌入；该工作由 Tim Sainburg、Leland McInnes 和 Timothy Q. Gentner 于 2021 年发表在《Neural Computation》上。<sup>[25](https://doi.org/10.1162/neco_a_01434)</sup> 参数化 UMAP 的性能与非参数化 UMAP 相当，同时为新数据提供快速的在线嵌入，UMAP 可作为正则化约束自编码器的潜在分布。<sup>[25](https://doi.org/10.1162/neco_a_01434)</sup>

## 应用

UMAP 用于可视化单细胞 RNA-seq 数据<sup>[20](https://doi.org/10.1038/nbt.4314)</sup>，并作为聚类和其他机器学习任务的预处理。<sup>[1](https://www.nature.com/articles/s43586-024-00363-x)</sup> viSNE 将 t-SNE 应用于高维单细胞测量术数据，揭示了白血病的表型异质性。<sup>[21](https://doi.org/10.1038/nbt.2594)</sup> 在针对系谱真值评估的群体结构可视化中，t-SNE 和 UMAP 在除草莓外的每个数据集上都优于 PCA，而基于神经网络的方法落后，MDS 表现最差。<sup>[26](https://pmc.ncbi.nlm.nih.gov/articles/PMC9434256/)</sup> 在 30 个模拟和 5 个真实 scRNA-seq 数据集及 10 种方法中，t-SNE 以最高准确率获得最佳总体性能评分，而 UMAP 表现出最高稳定性、中等准确率和第二高计算成本。<sup>[27](https://www.frontiersin.org/journals/genetics/articles/10.3389/fgene.2021.646936/full)</sup> umap-learn 库的监督、半监督和变换功能将这些用途扩展到将新数据嵌入预训练空间。<sup>[16](https://doi.org/10.21105/joss.00861)</sup>

## 局限与替代方案

**聚类形状不是距离。** t-SNE 对困惑度参数非常敏感，会产生虚假聚类；t-SNE 和 UMAP 都能很好地保留局部结构，但难以保留全局结构。<sup>[2](https://doi.org/10.48550/arxiv.2012.04456)</sup> 关于 UMAP 是否比 t-SNE 保留更多全局结构，UMAP 作者写道它“可以说保留了更多的全局结构，且运行时间性能更优”，<sup>[3](https://doi.org/10.48550/arxiv.1802.03426)</sup> 而独立基准发现 t-SNE 和 UMAP 在全局结构指标上表现不佳，且对预处理不鲁棒。<sup>[28](https://pmc.ncbi.nlm.nih.gov/articles/PMC9296444/)</sup> 这一分歧尚未解决。

定量而言，单细胞数据的二维嵌入显示，相对于环境维邻居的平均 Jaccard 距离高于 0.7，且相异性随数据集规模增加。<sup>[7](https://doi.org/10.1371/journal.pcbi.1011288)</sup> 所有方法的 kNN 召回率均低于 40%，尽管 UMAP 和 t-SNE 的 kNN 准确率保持在 90% 以上，而二维 PCA 低于 62%，因此低维邻居仍保持同类型且对分类有用。<sup>[6](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1012403)</sup> 在 10-PC 空间与 t-SNE 空间中，成对 k-means 质心距离的 Spearman 相关性在 k = 5、6、7 时分别仅为 0.72、0.46 和 0.48，UMAP 更差；PBMC 数据集 10-PC 空间中非零的第二 Betti 数（拓扑中形状孔洞的计数）表明任何二维表示都必须被不连续地撕裂，就像地图的边缘一样。<sup>[29](https://pmc.ncbi.nlm.nih.gov/articles/PMC10863674/)</sup> 当实际分布不那么离散时，非线性方法可能夸大聚类的存在，且所有方法都会扭曲局部和全局结构，因此聚类之间和内部的距离不一致并随超参数变化。<sup>[26](https://pmc.ncbi.nlm.nih.gov/articles/PMC9434256/)</sup> UMAP 结果随不同超参数设置而剧烈变化。<sup>[27](https://www.frontiersin.org/journals/genetics/articles/10.3389/fgene.2021.646936/full)</sup>

与 PCA 中参数化映射可嵌入任何输入不同，标准非参数化 t-SNE 及类似方法不学习全局定义的嵌入映射，这与 UMAP 的样本外变换和参数化邻域嵌入变体形成对比；LOO-map 诊断可识别夸大聚类分离或产生虚假局部结构的映射不连续性，并检测拓扑扭曲，例如 t-SNE 将[瑞士卷](https://www.edgepedia.org/zh/swiss-roll)分裂为两个不连通的部分。<sup>[30](https://doi.org/10.1038/s41467-025-60434-9)</sup> 单细胞辩论双方的实际指导是，二维嵌入用于探索性假设生成，而非定量下游分析。<sup>[6](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1012403)</sup><sup> • </sup><sup>[26](https://pmc.ncbi.nlm.nih.gov/articles/PMC9434256/)</sup> 当全局结构重要时的替代方案包括 TriMap 和 PaCMAP，<sup>[28](https://pmc.ncbi.nlm.nih.gov/articles/PMC9296444/)</sup> 全局结构附加组件如 LMC，<sup>[31](https://doi.org/10.1007/s10044-025-01585-9)</sup> 用于计数值单细胞数据的 GLM-PCA，<sup>[32](https://doi.org/10.1186/s13059-019-1861-6)</sup> 以及直接计算的高维距离或拓扑数据分析。<sup>[29](https://pmc.ncbi.nlm.nih.gov/articles/PMC10863674/)</sup>

## References

1. [Uniform manifold approximation and projection | Nature Reviews Methods Primers](https://www.nature.com/articles/s43586-024-00363-x)
2. [Wang, Yingfan and colleagues (2020). Understanding How Dimension Reduction Tools Work: An Empirical Approach to Deciphering t-SNE, UMAP, TriMAP, and PaCMAP for Data Visualization. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2012.04456)
3. [McInnes, Leland, Healy, John, Melville, James (2018). UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1802.03426)
4. [Draganov, Andrew and colleagues (2023). ActUp: Analyzing and Consolidating tSNE and UMAP. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2305.07320)
5. [Accelerating t-SNE using Tree-Based Algorithms (van der Maaten, JMLR 2014)](https://lvdmaaten.github.io/publications/papers/JMLR_2014.pdf)
6. [The art of seeing the elephant in the room: 2D embeddings of single-cell data do make sense (PLOS Computational Biology, 2024)](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1012403)
7. [Tara Chari, Lior Pachter (2023). The specious art of single-cell genomics. PLoS Computational Biology.](https://doi.org/10.1371/journal.pcbi.1011288)
8. [Run Massive-Scale UMAP in Minutes Using Multiple GPUs (NVIDIA Technical Blog)](https://developer.nvidia.com/blog/run-massive-scale-umap-in-minutes-using-multiple-gpus-without-losing-accuracy/)
9. [Dimensionality Reduction: A Comparative Review](http://faculty.ist.psu.edu/vhonavar/Courses/dsmethods/dim1.pdf)
10. [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)
11. [Sam T. Roweis, Lawrence K. Saul (2000). Nonlinear Dimensionality Reduction by Locally Linear Embedding. Science.](https://doi.org/10.1126/science.290.5500.2323)
12. [Think Globally, Fit Locally: Unsupervised Learning of Low Dimensional Manifolds](https://jmlr.org/papers/volume4/saul03a/saul03a.pdf)
13. [A kernel view of the dimensionality reduction of manifolds](https://dl.acm.org/doi/10.1145/1015330.1015417)
14. [UMAP (book chapter, Springer)](https://link.springer.com/chapter/10.1007/978-3-031-97973-6_5)
15. [How UMAP Works, umap-learn documentation](https://umap-learn.readthedocs.io/en/latest/how%5Fumap%5Fworks.html)
16. [Leland McInnes and colleagues (2018). UMAP: Uniform Manifold Approximation and Projection. The Journal of Open Source Software.](https://doi.org/10.21105/joss.00861)
17. [Massive-Scale Out-Of-Core UMAP on the GPU (MLSys 2026, NVIDIA)](https://proceedings.mlsys.org/paper_files/paper/2026/file/0badcb4e95306df76a719409155e46e8-Paper-Conference.pdf)
18. [Mikhail Belkin, Partha Niyogi (2002). Laplacian Eigenmaps and Spectral Techniques for Embedding and Clustering. The MIT Press eBooks.](https://doi.org/10.7551/mitpress/1120.003.0080)
19. [Ronald R. Coifman, Stéphane Lafon (2006). Diffusion maps. Applied and Computational Harmonic Analysis.](https://doi.org/10.1016/j.acha.2006.04.006)
20. [Etienne Becht and colleagues (2018). Dimensionality reduction for visualizing single-cell data using UMAP. Nature Biotechnology.](https://doi.org/10.1038/nbt.4314)
21. [El-ad David Amir and colleagues (2013). viSNE enables visualization of high dimensional single-cell data and reveals phenotypic heterogeneity of leukemia. Nature Biotechnology.](https://doi.org/10.1038/nbt.2594)
22. [Linderman, George C. and colleagues (2017). Efficient Algorithms for t-distributed Stochastic Neighborhood Embedding. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1712.09005)
23. [Amid, Ehsan, Warmuth, Manfred K. (2019). TriMap: Large-scale Dimensionality Reduction Using Triplets. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1910.00204)
24. [Uniform Manifold Approximation and Projection (UMAP) and its Variants: Tutorial and Survey](https://ar5iv.labs.arxiv.org/html/2109.02508)
25. [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)
26. [Quantitative evaluation of nonlinear methods for population structure visualization and inference](https://pmc.ncbi.nlm.nih.gov/articles/PMC9434256/)
27. [A Comparison for Dimensionality Reduction Methods of Single-Cell RNA-seq Data (Frontiers in Genetics)](https://www.frontiersin.org/journals/genetics/articles/10.3389/fgene.2021.646936/full)
28. [Towards a comprehensive evaluation of dimension reduction methods for transcriptomic data visualization](https://pmc.ncbi.nlm.nih.gov/articles/PMC9296444/)
29. [What Cannot Be Seen Correctly in 2D Visualizations Of Single-Cell 'Omics Data? (Cell Systems, 2023)](https://pmc.ncbi.nlm.nih.gov/articles/PMC10863674/)
30. [Zhexuan Liu, Rong Ma, Yiqiao Zhong (2025). Assessing and improving reliability of neighbor embedding methods: a map-continuity perspective. Nature Communications.](https://doi.org/10.1038/s41467-025-60434-9)
31. [Jacob Gildenblat, Jens Pahnke (2026). Dimensionality reduction with strong global structure preservation. Pattern Analysis and Applications.](https://doi.org/10.1007/s10044-025-01585-9)
32. [F. William Townes and colleagues (2019). Feature selection and dimension reduction for single-cell RNA-Seq based on a multinomial model. Genome biology.](https://doi.org/10.1186/s13059-019-1861-6)
33. [Transforming New Data with Parametric UMAP, umap 0.5.8 documentation](https://umap-learn.readthedocs.io/en/latest/transform_landmarked_pumap.html)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 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/nonlinear-dimensionality-reduction

English original: https://www.edgepedia.org/nonlinear-dimensionality-reduction
