# 相关向量机

相关向量机（relevance vector machine, RVM）是一种用于回归与分类的贝叶斯方法，它构建稀疏核模型：对每个权重分别设置一个先验超参数，在训练过程中剪除大多数基函数，并输出完整的预测分布而非点决策。它在形式上与支持向量机（support vector machine, SVM）功能相同，但通常使用的核函数要少得多，允许使用任意非Mercer基函数，无需正则化权衡参数，并能给出概率性预测。<sup>[1](https://jmlr.org/papers/volume1/tipping01a/tipping01a.pdf)</sup><sup> • </sup><sup>[2](https://proceedings.neurips.cc/paper_files/paper/1999/file/f3144cefe89a60d6a1afaf7859c5076b-Paper.pdf)</sup>

| 关键事实 | 详情 |
|---|---|
| 提出者 | Michael E. Tipping，NIPS 1999会议论文（2000年发表于第12卷会议录）及JMLR 2001期刊论文<sup>[1](https://jmlr.org/papers/volume1/tipping01a/tipping01a.pdf)</sup> |
| 模型形式 | 核基上的广义线性模型，与SVM的函数形式相同<sup>[2](https://proceedings.neurips.cc/paper_files/paper/1999/file/f3144cefe89a60d6a1afaf7859c5076b-Paper.pdf)</sup> |
| 稀疏机制 | 每个权重一个ARD超参数；超参数发散至无穷大时剪除基函数<sup>[2](https://proceedings.neurips.cc/paper_files/paper/1999/file/f3144cefe89a60d6a1afaf7859c5076b-Paper.pdf)</sup> |
| 典型稀疏度 | 保留的训练点不足5%，而SVM的支持向量为30–50%<sup>[3](https://tristanfletcher.co.uk/rvm-explained)</sup> |
| 代价 | 原始算法需\( O(N^{2}) \)存储和\( O(N^{3}) \)计算<sup>[2](https://proceedings.neurips.cc/paper_files/paper/1999/file/f3144cefe89a60d6a1afaf7859c5076b-Paper.pdf)</sup> |
| 输出 | 预测均值与方差，例如\( \sigma^{2}(x_{0}) = \beta^{-1} + \phi(x_{0})^{T} \Sigma \phi(x_{0}) \)<sup>[4](https://tristanfletcher.co.uk/assets/documents/rvm_explained_paper.pdf)</sup> |
| 主要局限 | 由于隐含的高斯过程协方差是退化的，预测方差在远离训练数据处会收缩<sup>[5](https://mlg.eng.cam.ac.uk/pub/pdf/RasQui05.pdf)</sup> |

## 工作原理

RVM是对广义线性模型\( t = y + \epsilon \)的贝叶斯处理，其中\( y(x) = \sum_{i} w_{i} \phi_{i}(x) \)，基函数\( \phi_{i} \)通常是中心位于训练输入上的核。在权重上放置高斯先验，每个权重对应一个精度超参数\( \alpha_{i} \)。这种自动相关性判定（automatic relevance determination, ARD）先验是产生稀疏性的关键：在重估计过程中，许多\( \alpha_{i} \)趋近无穷大，相应权重的后验在零处变得无限尖锐，该基函数即被剪除。权重非零的幸存训练向量称为相关向量。<sup>[1](https://jmlr.org/papers/volume1/tipping01a/tipping01a.pdf)</sup><sup> • </sup><sup>[2](https://proceedings.neurips.cc/paper_files/paper/1999/file/f3144cefe89a60d6a1afaf7859c5076b-Paper.pdf)</sup>

超参数通过最大化边际似然来估计，这是一种II型最大似然方法，MacKay（1992）称之为证据法。<sup>[1](https://jmlr.org/papers/volume1/tipping01a/tipping01a.pdf)</sup><sup> • </sup><sup>[6](https://doi.org/10.1162/neco.1992.4.3.415)</sup>在Gamma超先验下对每个精度超参数积分，得到对应权重的边际先验正比于Student-t密度，倾向于小权重；对于均匀超先验，隐含先验\( p(w_{i}) \propto 1/|w_{i}| \)像拉普拉斯先验一样在零处具有尖锐峰值。<sup>[1](https://jmlr.org/papers/volume1/tipping01a/tipping01a.pdf)</sup>Wipf、Palmer和Rao后来证明，这种稀疏贝叶斯学习可以在对偶形式下重新表述为严格的变分近似，这解释了为何无需假设超先验即可实现稀疏性。<sup>[7](https://papers.nips.cc/paper_files/paper/2003/file/52cf49fea5ff66588408852f65cf8272-Paper.pdf)</sup>

## 实现方法

训练迭代进行。给定由核函数值组成的设计矩阵\( \Phi \)和目标\( t \)，权重后验为高斯分布，\( \Sigma = (A + \beta \Phi^{T} \Phi)^{-1} \)，\( m = \beta \Sigma \Phi^{T} t \)，其中\( A = \mathrm{diag}(\alpha) \)。<sup>[4](https://tristanfletcher.co.uk/assets/documents/rvm_explained_paper.pdf)</sup><sup> • </sup><sup>[8](https://proceedings.mlr.press/r4/tipping03a.html)</sup>然后按\( \alpha_{i} = \gamma_{i}/m_{i}^{2} \)更新超参数，其中\( \gamma_{i} = 1 - \alpha_{i} \Sigma_{ii} \)衡量每个权重被数据确定的程度，同时更新\( \beta = (N - \sum_{i} \gamma_{i}) / \| t - \Phi m \|^{2} \)。<sup>[2](https://proceedings.neurips.cc/paper_files/paper/1999/file/f3144cefe89a60d6a1afaf7859c5076b-Paper.pdf)</sup><sup> • </sup><sup>[4](https://tristanfletcher.co.uk/assets/documents/rvm_explained_paper.pdf)</sup>\( \alpha_{i} \)超过阈值的基函数被剪除，循环重复直至收敛。<sup>[4](https://tristanfletcher.co.uk/assets/documents/rvm_explained_paper.pdf)</sup>

预测使用后验均值\( t = m^{T} \phi(x_{0}) \)和方差\( \sigma^{2}(x_{0}) = \beta^{-1} + \phi(x_{0})^{T} \Sigma \phi(x_{0}) \)，因此每个预测都带有不确定性估计。<sup>[4](https://tristanfletcher.co.uk/assets/documents/rvm_explained_paper.pdf)</sup>对于分类，采用逻辑S形链接与伯努利似然会使权重后验难以处理，因此使用拉普拉斯近似配合[迭代重加权最小二乘](https://www.edgepedia.org/zh/iteratively-reweighted-least-squares)；其后验是对数凹的。<sup>[2](https://proceedings.neurips.cc/paper_files/paper/1999/file/f3144cefe89a60d6a1afaf7859c5076b-Paper.pdf)</sup>

## 起源

RVM由Michael E. Tipping在1999年会议论文中提出<sup>[2](https://proceedings.neurips.cc/paper_files/paper/1999/file/f3144cefe89a60d6a1afaf7859c5076b-Paper.pdf)</sup>，会议版本发表于《神经信息处理系统进展》第12卷（2000年），完整期刊版本《稀疏贝叶斯学习与相关向量机》发表于JMLR第1卷第211–244页，2001年9月1日出版。<sup>[1](https://jmlr.org/papers/volume1/tipping01a/tipping01a.pdf)</sup>它建立在[David J. C. MacKay](https://www.edgepedia.org/zh/david-j-c-mackay) 1992年发表于《神经计算》的论文《贝叶斯插值》中的证据法<sup>[6](https://doi.org/10.1162/neco.1992.4.3.415)</sup>和ARD先验之上，并与SVM共享函数形式，后者源自Boser及其同事1992年的最优间隔分类器。<sup>[1](https://jmlr.org/papers/volume1/tipping01a/tipping01a.pdf)</sup>Faul和Tipping 2002年的论文《稀疏贝叶斯学习分析》发表于[MIT Press](https://www.edgepedia.org/zh/mit-press)电子书。<sup>[9](https://doi.org/10.7551/mitpress/1120.003.0054)</sup>

## 变体

若干命名变体修改了训练过程。变分RVM在全贝叶斯变分范式下求解模型，给出参数和超参数的后验分布而非点估计；其计算代价更高，优势主要预期在数据有限时体现。<sup>[10](https://www.miketipping.com/papers/Bishop-VRVM-UAI-00.pdf)</sup>快速边际似然最大化从空模型开始，利用决策量\( \theta_{i} = q_{i}^{2} - s_{i} \)依次添加、删除或重估计基函数；它比原始方法快一个数量级，内存占用更少，并通过子集处理应用于多达一百万个数据点。<sup>[8](https://proceedings.mlr.press/r4/tipping03a.html)</sup>Vermaak、Godsill和Doucet 2003年的序贯贝叶斯核回归是非迭代的，只需对数据单遍扫描，每时间步代价为O(N)。<sup>[11](https://proceedings.neurips.cc/paper_files/paper/2003/file/8aec51422b30d61bce078b27f0babeb1-Paper.pdf)</sup>回填RVM用约10次\( O(N^{2}) \)迭代替代每次超参数更新时的\( O(N^{3}) \) [Cholesky分解](https://www.edgepedia.org/zh/cholesky-decomposition)，实现一个数量级的加速且不损失泛化性或稀疏性。<sup>[12](https://icml.cc/Conferences/2004/proceedings/papers/115.pdf)</sup>Schmolck和Everson 2007年的平滑相关向量机增加了平滑先验<sup>[13](https://doi.org/10.1007/s10994-007-5012-z)</sup>，Mohsenzadeh及其同事2013年的相关样本-特征机将稀疏贝叶斯学习扩展到特征-样本联合选择。<sup>[14](https://doi.org/10.1109/tcyb.2013.2260736)</sup>Helgøy、Skaug和Li（2024）在Template Model Builder中实现了RVM，通过自动评估的[拉普拉斯近似](https://www.edgepedia.org/zh/laplace-approximation-bayesian-inference)以最大边际似然估计超参数，并用活跃集算法将计算量降低数个数量级。<sup>[15](https://doi.org/10.1007/s11222-024-10476-8)</sup>2025年的fastrvm Python包在C++核心中实现了Tipping和Faul算法，并提供与scikit-learn兼容的RVR和RVC封装。<sup>[16](https://github.com/brdav/fastrvm)</sup>

## 应用

原始论文在标准回归和分类基准上演示了RVM：在Ripley合成问题上，RVM达到9.3%的测试误差，而SVM为10.6%，RVM使用4个核函数，而SVM使用38个<sup>[1](https://jmlr.org/papers/volume1/tipping01a/tipping01a.pdf)</sup>；在糖尿病数据集上仅用4个核即达到当时最佳性能。<sup>[2](https://proceedings.neurips.cc/paper_files/paper/1999/file/f3144cefe89a60d6a1afaf7859c5076b-Paper.pdf)</sup>已记录的应用领域包括信号处理、地质统计、医学图像分析和金融预测。最近，RVM家族被应用于生物信息学：Belenguer-Llorens、Sevilla-Salcedo、Parrado-Hernández和Gómez-Verdejo（2025）的相关特征与向量机针对宽数据基因表达微阵列诊断，作者报告其以最紧凑的解实现了优越的诊断性能，并选出与已知生物标志物一致的基因。<sup>[17](https://doi.org/10.1016/j.compbiomed.2025.110985)</sup>

## 局限与替代方案

主要局限是训练代价。原始算法需要\( O(N^{2}) \)存储和\( O(N^{3}) \)计算，使其比SVM训练慢得多；内存限制使原始实现仅能处理约5,000个样本。<sup>[2](https://proceedings.neurips.cc/paper_files/paper/1999/file/f3144cefe89a60d6a1afaf7859c5076b-Paper.pdf)</sup>在包含1,616个样本的钻孔矿石分类数据集上，RVM训练耗时6分钟，而SVM（含交叉验证）仅需5秒，约慢50倍。<sup>[18](https://geomet.engineering.queensu.ca/wp-content/uploads/2021-08-Koruk-Relevance-Vector-Machines-an-introduction.pdf)</sup>优化不是凸的，因此解不保证全局最优，结果可能对核选择和初始化敏感。Faul和Tipping（2002）表明，当某些超参数趋于无穷大时，边际似然会出现局部极大值。<sup>[5](https://mlg.eng.cam.ac.uk/pub/pdf/RasQui05.pdf)</sup>

概率输出带有已知的失效模式。视作高斯过程时，RVM的协方差函数是退化的，秩至多为相关向量的个数，因此测试点离训练数据越远，预测不确定性越小，这与期望行为相反；Rasmussen和Quiñonero-Candela得出结论：若预测方差重要，则不应使用RVM。<sup>[5](https://mlg.eng.cam.ac.uk/pub/pdf/RasQui05.pdf)</sup>fastrvm包记录了同样的现象：使用局部化RBF基时，外推区域中均值和方差都可能坍缩至零。<sup>[16](https://github.com/brdav/fastrvm)</sup>

与SVM相比，RVM在不同任务上以不同方式用精度换取稀疏性。在Bishop和Tipping总结的实验中，RVM在回归中平均使用的基函数数量为SVM的15%，误差比SVM低14%，但在分类中误差高8%，使用的基函数数量仅为SVM的17%。<sup>[19](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/bishop-nato-bayes.pdf)</sup>RVM无需交叉验证的正则化参数C，且更自然地处理多于两类的情况，但训练时间更长。<sup>[18](https://geomet.engineering.queensu.ca/wp-content/uploads/2021-08-Koruk-Relevance-Vector-Machines-an-introduction.pdf)</sup>与[高斯过程](https://www.edgepedia.org/zh/gaussian-process)相比，RVM的主要优势在于基函数选择的灵活性，而GP的主要优势在于良态的预测方差；RVM实际上是GP的一个特例，其退化协方差依赖于训练数据。<sup>[20](https://gaussianprocess.org/gpml/chapters/RW6.pdf)</sup><sup> • </sup><sup>[21](https://ar5iv.labs.arxiv.org/html/2009.09217)</sup>

## References

1. [Sparse Bayesian Learning and the Relevance Vector Machine (Tipping, JMLR 2001)](https://jmlr.org/papers/volume1/tipping01a/tipping01a.pdf)
2. [The Relevance Vector Machine (Tipping, NIPS 1999)](https://proceedings.neurips.cc/paper_files/paper/1999/file/f3144cefe89a60d6a1afaf7859c5076b-Paper.pdf)
3. [Relevance Vector Machine Explained (web tutorial)](https://tristanfletcher.co.uk/rvm-explained)
4. [Relevance Vector Machines Explained (Fletcher technical note)](https://tristanfletcher.co.uk/assets/documents/rvm_explained_paper.pdf)
5. [Healing the Relevance Vector Machine through Augmentation (Rasmussen & Quiñonero-Candela)](https://mlg.eng.cam.ac.uk/pub/pdf/RasQui05.pdf)
6. [David J. C. MacKay (1992). Bayesian Interpolation. Neural Computation.](https://doi.org/10.1162/neco.1992.4.3.415)
7. [Perspectives on Sparse Bayesian Learning (Wipf & Rao, NIPS 2003)](https://papers.nips.cc/paper_files/paper/2003/file/52cf49fea5ff66588408852f65cf8272-Paper.pdf)
8. [Fast Marginal Likelihood Maximisation for Sparse Bayesian Models (Tipping & Faul, AISTATS 2003)](https://proceedings.mlr.press/r4/tipping03a.html)
9. [Anita C. Faul, Michael E. Tipping (2002). Analysis of Sparse Bayesian Learning. The MIT Press eBooks.](https://doi.org/10.7551/mitpress/1120.003.0054)
10. [Variational Relevance Vector Machines (Bishop & Tipping, UAI 2000)](https://www.miketipping.com/papers/Bishop-VRVM-UAI-00.pdf)
11. [Sequential Bayesian Kernel Regression (NIPS 2003)](https://proceedings.neurips.cc/paper_files/paper/2003/file/8aec51422b30d61bce078b27f0babeb1-Paper.pdf)
12. [The Bayesian Backfitting Relevance Vector Machine (D'Souza, Vijayakumar & Schölkopf, ICML 2004)](https://icml.cc/Conferences/2004/proceedings/papers/115.pdf)
13. [Alexander Schmolck, Richard Everson (2007). Smooth relevance vector machine: a smoothness prior extension of the RVM. Machine Learning.](https://doi.org/10.1007/s10994-007-5012-z)
14. [Yalda Mohsenzadeh and colleagues (2013). The Relevance Sample-Feature Machine: A Sparse Bayesian Learning Approach to Joint Feature-Sample Selection. IEEE Transactions on Cybernetics.](https://doi.org/10.1109/tcyb.2013.2260736)
15. [Ingvild M. Helgøy, Hans J. Skaug, Yushu Li (2024). Sparse Bayesian learning using TMB (Template Model Builder). Statistics and Computing.](https://doi.org/10.1007/s11222-024-10476-8)
16. [brdav/fastrvm, Relevance Vector Machine in Python with a C++ core](https://github.com/brdav/fastrvm)
17. [Albert Belenguer-Llorens and colleagues (2025). Addressing wide-data studies of gene expression microarrays with the Relevance Feature and Vector Machine. Computers in Biology and Medicine.](https://doi.org/10.1016/j.compbiomed.2025.110985)
18. [Relevance Vector Machines: An Introduction (Queen's University technical report 2021-08)](https://geomet.engineering.queensu.ca/wp-content/uploads/2021-08-Koruk-Relevance-Vector-Machines-an-introduction.pdf)
19. [Bayesian Regression and Classification (Bishop & Tipping tutorial)](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/bishop-nato-bayes.pdf)
20. [Gaussian Processes for Machine Learning, Chapter 6 (Rasmussen & Williams)](https://gaussianprocess.org/gpml/chapters/RW6.pdf)
21. [A Joint Introduction to Gaussian Processes and Relevance Vector Machines (arXiv review)](https://ar5iv.labs.arxiv.org/html/2009.09217)

---
*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 › Kernel methods and support vector machines

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/relevance-vector-machine

English original: https://www.edgepedia.org/relevance-vector-machine
