# 潜空间模型（网络分析）

潜空间模型是一种用于网络数据的统计模型，它将每个节点表示为某个不可观测的潜空间中的一个点，两个节点之间存在边的概率由它们的潜位置决定，通常通过距离函数或内积函数来确定。由于该模型是带有随机效应的广义线性模型，它把网络分析与标准的回归方法体系联系了起来。<sup>[1](https://www.cambridge.org/core/journals/network-science/article/spherical-latent-space-models-for-social-networks-geometryaware-inference-and-comparison-across-latent-geometries/F44AC62C5FF80603B951A1594B881126)</sup>

| 关键事实 | 详情 |
|---|---|
| 原始连边模型 | 连边的对数几率：\( \eta_{ij} = \alpha + \beta' x_{ij} - \lVert z_i - z_j \rVert \)，结合了截距、协变量效应与负的欧几里得潜距离<sup>[2](https://doi.org/10.1080/10618600.2012.679240)</sup> |
| 两种基本几何 | 欧几里得潜空间与超度量潜空间<sup>[3](https://pmc.ncbi.nlm.nih.gov/articles/PMC3697157/)</sup> |
| 估计 | 采用 Metropolis 与 Gibbs 更新的贝叶斯 MCMC、两阶段最大似然，或变分方法<sup>[2](https://doi.org/10.1080/10618600.2012.679240)</sup><sup> • </sup><sup>[4](https://doi.org/10.1111/j.1467-985x.2007.00471.x)</sup> |
| 可扩展性 | 变分方法可处理超过 10 万个节点、100 亿个二元组的网络；病例-对照似然可将 MCMC 的计算成本从 \( O(N^2) \) 降至 \( O(N) \)<sup>[3](https://pmc.ncbi.nlm.nih.gov/articles/PMC3697157/)</sup><sup> • </sup><sup>[2](https://doi.org/10.1080/10618600.2012.679240)</sup> |
| 可识别性 | 似然对旋转、反射、平移和标签交换具有不变性；可通过 Procrustes 变换或最小 Kullback–Leibler 估计来处理<sup>[4](https://doi.org/10.1111/j.1467-985x.2007.00471.x)</sup><sup> • </sup><sup>[3](https://pmc.ncbi.nlm.nih.gov/articles/PMC3697157/)</sup> |
| 命名变体 | 潜位置聚类模型、潜聚类随机效应模型、双线性/投影模型与特征模型、动态潜空间模型、球面与超度量空间<sup>[4](https://doi.org/10.1111/j.1467-985x.2007.00471.x)</sup><sup> • </sup><sup>[5](https://proceedings.neurips.cc/paper_files/paper/2005/file/ec8b57b0be908301f5748fb04b0714c7-Paper.pdf)</sup> |
| 软件 | latentnet R 包可拟合潜位置模型与潜聚类模型，并提供后验预测检验和网络模拟<sup>[6](https://www.jstatsoft.org/article/view/v024i05)</sup> |

## 工作原理

每个节点 \( i \) 在 \( r \) 维空间中获得一个潜位置 \( z_i \)，每个二元组 \( (i,j) \) 的连边概率由这些位置计算得出。在最初的距离模型中，连边的对数几率为

\[ \eta_{ij} = \alpha + \beta' x_{ij} - \lVert z_i - z_j \rVert, \]

其中 \( x_{ij} \) 是观测协变量的向量，\( \alpha \) 控制网络密度，潜位置之间的负欧几里得距离进入线性预测子。<sup>[7](https://handcock.github.io/publication/latent-space/hoffrafteryhandcock2002.pdf)</sup><sup> • </sup><sup>[2](https://doi.org/10.1080/10618600.2012.679240)</sup>

更一般地，模型写作 \( \mathrm{logit}(P(Y_{i,j}=1 \mid z_i, z_j)) = \beta_0 + x_{i,j}^{\top}\beta + d(z_i, z_j) \)，其中 \( d \) 是距离函数；两种标准选择是：\( d(z_i,z_j) = -\lVert z_i - z_j \rVert \) 对应欧几里得潜效应，\( d(z_i,z_j) = z_i^{\top} z_j \) 对应内积效应。<sup>[3](https://pmc.ncbi.nlm.nih.gov/articles/PMC3697157/)</sup> 一种现代表述为每个节点同时赋予潜位置 \( z_i \in \mathbb{R}^r \) 和一个刻画节点异质性的度参数 \( \alpha_i \)，其中 \( \theta_{ij} = \sigma(z_i^{\top} z_j + \alpha_i + \alpha_j) \)，\( \sigma \) 通常是光滑且递增的。<sup>[8](https://arxiv.org/html/2312.06605)</sup>

由于似然仅通过距离依赖于潜位置，它对位置的反射、旋转和平移具有不变性，对聚类的重新标记也具有不变性。<sup>[4](https://doi.org/10.1111/j.1467-985x.2007.00471.x)</sup> 这些不可识别性可通过 Procrustes 变换（将后验抽样对齐到共同朝向）或最小 Kullback–Leibler（MKL）估计来处理。<sup>[3](https://pmc.ncbi.nlm.nih.gov/articles/PMC3697157/)</sup> 有一种实现将位置限制为固定的均方根长度，以保证可识别性。<sup>[4](https://doi.org/10.1111/j.1467-985x.2007.00471.x)</sup>

## 实现方式

贝叶斯拟合将潜位置和系数视为带先验的参数，并用 MCMC 对其后验进行抽样。原始算法对 \( \alpha \)、\( \beta \) 和每个 \( z_i \) 采用 Metropolis 更新，从以当前值为中心的对称分布中提出候选值，并用一个 Gibbs 步骤从完全条件分布中抽样 \( \sigma_z^2 \)。<sup>[2](https://doi.org/10.1080/10618600.2012.679240)</sup> 后来的实现使用 Metropolis-Hastings 步骤更新位置和系数，相对原始算法做了修改，去掉了链内的 Procrustes 变换。<sup>[9](https://handcock.github.io/publication/positional/shortreedhandcockhoff2006.pdf)</sup>

存在两种更快的替代方案。两阶段最大似然方法先计算非聚类潜空间模型的最大似然估计，再拟合聚类模型；完全贝叶斯方案则同时估计位置和聚类。<sup>[4](https://doi.org/10.1111/j.1467-985x.2007.00471.x)</sup> 变分方法是近似方法，但速度快，可应用于超过 10 万个节点、100 亿个二元组的网络。<sup>[3](https://pmc.ncbi.nlm.nih.gov/articles/PMC3697157/)</sup> 对于大型网络，病例-对照近似似然在 MCMC 中替代完全似然，将计算时间从 \( O(N^2) \) 降至 \( O(N) \)。<sup>[2](https://doi.org/10.1080/10618600.2012.679240)</sup>

## 起源

网络潜空间模型是围绕不可观测的“社会空间”这一概念提出的，其推断在最大似然和贝叶斯两种框架下均有发展，并提出了用于拟合的马尔可夫链蒙特卡洛程序。<sup>[7](https://handcock.github.io/publication/latent-space/hoffrafteryhandcock2002.pdf)</sup> 其位置概念不同于早期基于块模型的社会空间——在后者中，占据同一位置的是具有相同或等价关系模式的行为者；潜空间模型则将行为者置于一个度量空间中，关系作为距离的函数而形成。<sup>[9](https://handcock.github.io/publication/positional/shortreedhandcockhoff2006.pdf)</sup> 前身传统包括随机块模型，其中节点被归入潜类别，而非连续定位。

后续发展沿着原始文献中记录的若干路线推进：Handcock、Raftery 和 Tantrum（2007）在《皇家统计学会杂志 A 辑》上报告了潜位置聚类模型<sup>[4](https://doi.org/10.1111/j.1467-985x.2007.00471.x)</sup>；Krivitsky 及其同事（2009）在《社会网络》上报告了潜聚类随机效应模型<sup>[10](https://doi.org/10.1016/j.socnet.2009.04.001)</sup>；Hoff（2007）在 arXiv 上报告了用于对称关系数据的特征模型<sup>[11](https://doi.org/10.48550/arxiv.0711.1146)</sup>；Sarkar 和 Moore（2005）报告了动态潜空间模型<sup>[5](https://proceedings.neurips.cc/paper_files/paper/2005/file/ec8b57b0be908301f5748fb04b0714c7-Paper.pdf)</sup>；Raftery 及其同事（2012）在《计算与图形统计杂志》上报告了病例-对照近似似然<sup>[2](https://doi.org/10.1080/10618600.2012.679240)</sup>；Gwee、Gormley 和 Fop（2023）在《贝叶斯分析》上报告了潜收缩位置模型。<sup>[12](https://doi.org/10.1214/23-ba1403)</sup>

## 变体

**潜位置聚类模型。** 潜位置从 \( G \) 个多元正态分布的有限混合中抽取，每个分布代表一个组，因此基于模型的节点聚类可直接由拟合的位置得出。<sup>[4](https://doi.org/10.1111/j.1467-985x.2007.00471.x)</sup>

**随机效应模型。** 加入发送者和接收者随机效应 \( \delta_i \) 和 \( \gamma_j \)，得到线性预测子 \( \eta_{i,j} = \sum_{k=1}^{p} \beta_k X_{i,j,k} + d(Z_i, Z_j) + \delta_i + \gamma_j \)，其中 \( d \) 为负欧几里得距离或双线性（内积）。<sup>[13](https://cran.rstudio.com/web/packages/latentnet/refman/latentnet.html)</sup> 潜聚类随机效应模型可同时刻画度分布、聚类和同质性。<sup>[10](https://doi.org/10.1016/j.socnet.2009.04.001)</sup>

**双线性模型与特征模型。** 内积 \( z_i^{\top} z_j \) 直接度量相似性，而非通过距离，一类流行的模型正是采用这种内积形式。<sup>[8](https://arxiv.org/html/2312.06605)</sup> Hoff（2007）报告的特征模型为对称关系数据提供了一种灵活的构造，涵盖潜空间和潜块结构。<sup>[11](https://doi.org/10.48550/arxiv.0711.1146)</sup>

**动态变体与几何变体。** 在动态变体中，每个实体 \( i \) 在时刻 \( t \) 具有潜位置 \( x_i \)，收集于 \( n \times p \) 矩阵 \( X_t \) 中，每个时间点的边以图 \( G_t \) 的形式观测。<sup>[5](https://proceedings.neurips.cc/paper_files/paper/2005/file/ec8b57b0be908301f5748fb04b0714c7-Paper.pdf)</sup> 潜空间模型除欧几里得形式外还有超度量形式<sup>[3](https://pmc.ncbi.nlm.nih.gov/articles/PMC3697157/)</sup>；球面潜空间模型配合几何感知推断，可处理由高度非线性过程生成的网络，这类过程超出了欧几里得空间的表示能力。<sup>[1](https://www.cambridge.org/core/journals/network-science/article/spherical-latent-space-models-for-social-networks-geometryaware-inference-and-comparison-across-latent-geometries/F44AC62C5FF80603B951A1594B881126)</sup>

**维度选择与收缩。** 潜维度 \( r \) 通常通过在若干维度下拟合模型并用模型选择准则比较来确定。潜收缩位置模型则对潜位置方差施加乘性截断伽马过程先验，随着维度增加产生收缩，从而自动推断有效维度，免去反复拟合和选择。<sup>[14](https://arxiv.org/abs/2311.16451)</sup>

## 应用

对观测图拟合潜空间模型，可为每个节点生成估计位置、为任何观测协变量生成系数，并给出边形成的完整概率描述，支持聚类和新网络的模拟。<sup>[7](https://handcock.github.io/publication/latent-space/hoffrafteryhandcock2002.pdf)</sup><sup> • </sup><sup>[4](https://doi.org/10.1111/j.1467-985x.2007.00471.x)</sup><sup> • </sup><sup>[6](https://www.jstatsoft.org/article/view/v024i05)</sup> latentnet 包实现了这些模型，并提供用于拟合优度的后验预测检验，以及从拟合模型模拟网络的功能。<sup>[6](https://www.jstatsoft.org/article/view/v024i05)</sup> 与将节点归入潜类别的随机块模型相比，潜空间模型给出连续位置和基于距离的概率；原始论文在标准社会网络数据集上直接比较了这两种方法。<sup>[7](https://handcock.github.io/publication/latent-space/hoffrafteryhandcock2002.pdf)</sup>

## 局限与替代方案

基于 MCMC 的估计可扩展性差：计算成本随节点数呈二次增长，使潜位置模型难以拟合大型网络。<sup>[14](https://arxiv.org/abs/2311.16451)</sup> 病例-对照似然和变分方法可缓解这一问题，后者可处理超过 10 万个节点的网络。<sup>[2](https://doi.org/10.1080/10618600.2012.679240)</sup><sup> • </sup><sup>[3](https://pmc.ncbi.nlm.nih.gov/articles/PMC3697157/)</sup> 在统计层面，仅含单一密度参数的简单距离模型通过潜位置产生期望度的变异，但行为者特定的随机效应为刻画度异质性提供了额外的灵活性；加入随机发送者和接收者效应可处理行为者的非同质性，带随机效应的高斯潜位置模型能够表示观测社会网络中常见的重尾度分布、正渐近聚类系数和小世界行为。<sup>[10](https://doi.org/10.1016/j.socnet.2009.04.001)</sup><sup> • </sup><sup>[15](https://www.cambridge.org/core/journals/network-science/article/abs/properties-of-latent-variable-network-models/4508F358F8224266C132109062A0B09E)</sup><sup> • </sup><sup>[16](https://networkanalysis.netlify.app/materials/2026/day10_latent)</sup>

现代内积表述下的推断有其自身的挑战：参数数量随网络规模发散，参数数量的平方与样本量之比收敛到常数，违反了经典渐近要求；有人提出采用拉格朗日惩罚策略的约束最大似然估计，以恢复有效的推断。<sup>[8](https://arxiv.org/html/2312.06605)</sup>

## References

1. [Spherical latent space models for social networks: Geometry-aware inference and comparison across latent geometries (Network Science)](https://www.cambridge.org/core/journals/network-science/article/spherical-latent-space-models-for-social-networks-geometryaware-inference-and-comparison-across-latent-geometries/F44AC62C5FF80603B951A1594B881126)
2. [Adrian E. Raftery and colleagues (2012). Fast Inference for the Latent Space Network Model Using a Case-Control Approximate Likelihood. Journal of Computational and Graphical Statistics.](https://doi.org/10.1080/10618600.2012.679240)
3. [Computational Statistical Methods for Social Network Models](https://pmc.ncbi.nlm.nih.gov/articles/PMC3697157/)
4. [Mark S. Handcock, Adrian E. Raftery, Jeremy M. Tantrum (2007). Model-Based Clustering for Social Networks. Journal of the Royal Statistical Society Series A (Statistics in Society).](https://doi.org/10.1111/j.1467-985x.2007.00471.x)
5. [Dynamic Social Network Analysis using Latent Space Models (Sarkar & Moore, NIPS 2005)](https://proceedings.neurips.cc/paper_files/paper/2005/file/ec8b57b0be908301f5748fb04b0714c7-Paper.pdf)
6. [Fitting Latent Cluster Models for Networks with latentnet (Krivitsky & Handcock, Journal of Statistical Software)](https://www.jstatsoft.org/article/view/v024i05)
7. [Latent Space Approaches to Social Network Analysis](https://handcock.github.io/publication/latent-space/hoffrafteryhandcock2002.pdf)
8. [Statistical Inference on Latent Space Models for Network Data (arXiv, Dec 2023)](https://arxiv.org/html/2312.06605)
9. [Positional Estimation Within a Latent Space Model (Shortreed, Handcock, Hoff, 2006)](https://handcock.github.io/publication/positional/shortreedhandcockhoff2006.pdf)
10. [Pavel N. Krivitsky and colleagues (2009). Representing degree distributions, clustering, and homophily in social networks with latent cluster random effects models. Social Networks.](https://doi.org/10.1016/j.socnet.2009.04.001)
11. [Hoff, Peter D. (2007). Modeling homophily and stochastic equivalence in symmetric relational data. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.0711.1146)
12. [Xian Yao Gwee, Isobel Claire Gormley, Michael Fop (2023). A Latent Shrinkage Position Model for Binary and Count Network Data. Bayesian Analysis.](https://doi.org/10.1214/23-ba1403)
13. [latentnet package reference manual (CRAN)](https://cran.rstudio.com/web/packages/latentnet/refman/latentnet.html)
14. [Variational Inference for the Latent Shrinkage Position Model (VI-LSPM)](https://arxiv.org/abs/2311.16451)
15. [Properties of latent variable network models (Network Science, Cambridge)](https://www.cambridge.org/core/journals/network-science/article/abs/properties-of-latent-variable-network-models/4508F358F8224266C132109062A0B09E)
16. [Day 10: Latent Geometry, From Distance to the Factor Model](https://networkanalysis.netlify.app/materials/2026/day10_latent)

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

Topic: 物质世界与数学 › 数学与统计学 › 统计学与概率论 › Statistical inference, estimation, sampling, and testing

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/latent-space-model-network-analysis

English original: https://www.edgepedia.org/latent-space-model-network-analysis
