Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Keeping only the points that matter
An SVR model keeps every point that touches or leaves its tube, often a third of the data. The relevance vector machine starts with one kernel bump per training point, then asks the data, through Bayesian evidence, which bumps are worth keeping. Each bump has its own “how much do I trust that this weight is zero” knob. For most bumps the answer becomes “certainly zero”, and they are removed. What remains, often under 10% of the data, are the relevance vectors. As a bonus, the model reports an uncertainty band with every prediction.
Very sparse models are cheap to evaluate on embedded hardware, and a predictive variance tells a planner how much to trust each estimate. RVMs have been used for battery remaining-useful-life prediction with confidence bounds and for lightweight onboard regression. Their uncertainty must be used with care outside the training range, as this page shows.
- 1. RVMs are typically…
- 2. RVMs prune basis functions by…
- 3. In the demo's no-data region, the RVM's uncertainty band…
Level 1: Beginner
★★☆☆☆ Basic⏱ 25 minSecondary-school mathematics: arithmetic and elementary algebra.One re-estimation step by hand
Model. t = Φw + noise, with Φ the design matrix (a bias column plus one kernel column per training point). The prior is wᵢ ~ N(0, 1/αᵢ), and the noise precision is β.
Posterior over weights (for fixed α and β): Σ = (βΦᵀΦ + diag α)⁻¹ and μ = βΣΦᵀt.
Re-estimation (MacKay). γᵢ = 1 − αᵢΣᵢᵢ measures how well-determined weight i is by the data. The updates are:
- αᵢ ← γᵢ/μᵢ²;
- β ← (N − Σγᵢ)/‖t − Φμ‖².
Example.
- Weight 1: α₁ = 2, Σ₁₁ = 0.1, μ₁ = 3. Then γ₁ = 1 − 0.2 = 0.8 and α₁ ← 0.8/9 = 0.089. The prior loosens, so the weight is relevant.
- Weight 2: α₂ = 10, Σ₂₂ = 0.09, μ₂ = 0.1. Then γ₂ = 1 − 0.9 = 0.1 and α₂ ← 0.1/0.01 = 10. Its posterior mean is tiny relative to its uncertainty. Over iterations α₂ grows without bound and the basis is pruned.
The steps in plain English:
- Build a design matrix with a bias and one kernel column per training point.
- Start all αᵢ at 1 and β from a rough noise guess.
- Repeat: compute Σ and μ, then γ, then update α and β, and drop bases whose αᵢ exceeds a huge threshold (10⁹).
- Stop when α changes little. Predict with mean φ(x)ᵀμ and variance 1/β + φ(x)ᵀΣφ(x).
- 1. γᵢ close to 0 means weight i is…
- 2. A basis is pruned when its αᵢ…
- 3. Predictive variance = 1/β + …
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 35 minUndergraduate students and practising engineers.Sparse Bayesian learning
Evidence. Integrating out w gives t ~ N(0, C) with C = β⁻¹I + Φ·diag(α)⁻¹·Φᵀ. Type-II maximum likelihood maximises log p(t | α, β) = −½(log|C| + tᵀC⁻¹t) + constant over α and β. Setting the derivatives to zero gives the fixed-point updates above (MacKay, 1992).
Why it prunes (automatic relevance determination). The evidence trades fit against complexity. If a basis function adds little explanatory power beyond the others, the evidence increases monotonically as its αᵢ → ∞. Faul and Tipping (2002) showed the optimum for a single αᵢ is then at infinity, so the basis is removed exactly, not just shrunk.
Fast marginal likelihood (Tipping and Faul, 2003). Start with no bases and add, re-estimate or delete one basis at a time using closed-form changes in the evidence. The cost is O(NM²) with M the current number of bases, instead of O(N³).
RVM versus SVM/SVR.
| SVR | RVM | |
|---|---|---|
| Sparsity | points on or outside the tube (often 30–50%) | relevance vectors (often 5–10%) |
| Hyperparameters | C, ε, kernel | kernel only (α, β learned) |
| Kernel | must be PSD (Mercer) | any basis functions |
| Uncertainty | none | predictive variance |
| Training | convex QP | non-convex evidence; O(N³) per iteration naively |
Classification. Use a Bernoulli likelihood with a Laplace approximation for the posterior around its mode, plus the same α updates.
# scikit-learn has no RVM; sklearn-rvm or a short NumPy implementation (exercise 1) works.
# ARDRegression applies the same per-weight prior to the original features:
from sklearn.linear_model import ARDRegression- 1. RVM hyperparameters α and β are learned by…
- 2. Unlike SVMs, RVM basis functions…
- 3. The fast RVM algorithm starts with…
Level 3: Advanced
★★★★☆ Advanced⏱ 30 minGraduate level, with full derivations and proofs.Theory
Sparse Bayesian learning as a prior. Integrating the Gamma hyperprior on αᵢ in Tipping’s formulation gives a Student-t marginal prior on each weight, sharply peaked at 0 with heavy tails. That is a sparsity-inducing prior, like an L1 penalty but stronger. Wipf and Nagarajan (2008) showed type-II ML is equivalent to a non-separable, non-convex penalty that has fewer local minima than ℓ₀ while still giving exact sparsity.
The over-confidence problem. With localised basis functions (RBF centred on training points), φ(x) → 0 far from the data. The predictive variance then collapses to 1/β (plus the bias’s variance), which is no larger than inside the data. The model is most confident exactly where it knows least. Rasmussen and Quiñonero-Candela (2005) traced this to the degenerate GP prior implied by a finite basis. Their fix (“healing”) augments the basis at the test point. Exercise 1: the variance at x = 40 and x = 400 was the same 0.0098, barely above the 0.0094 seen inside the data. Exercise 2: 95% intervals covered only 83% of extrapolation points.
Other caveats.
- The evidence is non-convex, so results depend on initialisation.
- Naive training is O(N³) per iteration and slow for large N without the fast algorithm.
- Sparsity can be excessive on complex functions.
Interview questions.
- Why are RVMs sparser than SVMs? ARD drives most weight precisions to infinity, while SVM sparsity comes only from points lying strictly inside the margin or tube.
- When would you trust an RVM’s error bars? Inside the range of the training data. For extrapolation use a GP (whose variance reverts to the prior) or a healed RVM.
- 1. The RVM's marginal prior on each weight is…
- 2. Far from data, RVM predictive variance tends to…
- 3. Who analysed and 'healed' this over-confidence?
Level 4: Expert
★★★★★ Expert⏱ 25 minResearchers: original papers and open problems.RVM versus SVR versus Gaussian process
History.
- MacKay (1992, 1994) developed evidence-based Bayesian methods and automatic relevance determination for neural networks.
- Tipping (2000, 2001) introduced the RVM in NeurIPS and JMLR.
- Tipping and Faul (2003) gave the fast marginal-likelihood algorithm.
- Rasmussen and Quiñonero-Candela (2005) diagnosed the variance problem.
- Sparse Bayesian learning spread to compressed sensing and source localisation (Wipf and Rao, 2004).
Exercise 1.
- 7 relevance vectors of 100, with RMSE 0.035 to the sinc curve.
- The learned noise σ was 0.093 (true value 0.1), and 95% intervals covered 91% of fresh in-range points.
- Predictive variance at x = 40 and x = 400 was identical (0.0098). The band never widens away from the data.
Exercise 2. Setup: noisy sinc with n = 100 on [−10, 10], σ = 0.1, RBF γ = 0.1, 3 seeds. “Extrapolating” means 95% interval coverage on x in [12, 18].
| Model | basis functions | RMSE in range | 95% coverage in range | extrapolating |
|---|---|---|---|---|
| RVM | 9 | 0.036 | 0.919 | 0.826 |
| Gaussian process | 100 | 0.033 | 0.946 | 1.000 |
| SVR (ε = 0.1) | 32 | 0.037 | (none) | (none) |
- The RVM used 9 basis functions against SVR’s 32 and the GP’s 100, at similar accuracy (all within 0.033–0.037).
- In range, the RVM’s intervals were slightly over-confident (92% against a nominal 95%), while the GP’s were well calibrated.
- Extrapolating, the RVM’s intervals covered only 83%. The GP’s variance reverts to its prior, so it covered 100%. That is conservative, but safe.
- Recommendation: use RVMs for compact, fast predictors inside the training domain. Do not trust their error bars outside it.
RVMs in AI, robotics and aerospace
- Battery prognostics: RVM-based remaining-useful-life estimates with confidence bounds (popular in the prognostics literature).
- Embedded regression: a handful of kernel evaluations per prediction.
- Sparse Bayesian learning for direction-of-arrival estimation and sparse signal recovery in radar and communications.
- ARD for feature relevance in Gaussian processes and Bayesian neural networks.
References
- M. E. Tipping (2001). “Sparse Bayesian learning and the relevance vector machine.” JMLR 1.
- M. E. Tipping, A. C. Faul (2003). “Fast marginal likelihood maximisation for sparse Bayesian models.” AISTATS.
- D. J. C. MacKay (1992). “Bayesian interpolation.” Neural Computation 4(3).
- C. E. Rasmussen, J. Quiñonero-Candela (2005). “Healing the relevance vector machine through augmentation.” ICML.
- D. P. Wipf, S. Nagarajan (2008). “A new view of automatic relevance determination.” NeurIPS.