Foundations to Frontier
Tests
D. Classical Machine Learning › D1 Linear Models for Regression

Automatic Relevance Determination (ARD)

Automatic Relevance Determination extends Bayesian linear regression by giving every weight its own prior precision αᵢ. Maximising the marginal likelihood over all these precisions drives the priors of unneeded weights toward zero width, switching those features off, while relevant features keep wide priors. It is sparse Bayesian learning: feature selection with no λ to tune and no validation set, the idea behind the relevance vector machine and ARD kernels in Gaussian processes. This page covers the model, MacKay's fixed-point updates, why the evidence prunes, and its known weaknesses. In the exercises you implement ARD and compare it with Bayesian ridge on a sparse problem; then you benchmark ARD, a validation-tuned lasso and Bayesian ridge for accuracy and sparsity as the sample size grows.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Letting each clue argue for itself

In Bayesian ridge, one rule says how big all weights may be. ARD gives every clue its own rule and lets the data decide each one. If a clue keeps helping, its rule stays loose. If it doesn’t, its rule tightens until its weight is squeezed to zero and the clue is switched off. Nobody has to choose a penalty strength: the evidence does it.

Relevance learned from the evidence
0.00010.01110x1x2x3x4x5x6x7x8
kept (prior SD above 0.01): x1, x2, x4, x5, x7 · true: x2, x5, x7
Left bar of each pair: the learned prior SD 1/√αᵢ (log scale); right bar: the size of the posterior mean weight. Blue = truly relevant features. The evidence rewards shrinking the prior of any weight the data do not need, so its posterior mean is squeezed to zero; with few data points, a few noise features can survive with tiny weights.
Why engineers care

ARD finds which inputs matter without a validation set, which is useful when every test run is expensive. The same mechanism appears in Gaussian-process models, where ARD length scales reveal which design variables actually affect a simulation output.

📝 Quick check (Level 0)
0/3 answered
  1. 1. ARD gives…
  2. 2. An unhelpful feature's prior…
  3. 3. ARD chooses its regularisation using…

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

One update by hand

Suppose that after fitting, weight i has posterior mean mᵢ and the data determine it to the fraction γᵢ = 1 − αᵢSᵢᵢ, where Sᵢᵢ is its posterior variance. MacKay’s update sets

αᵢ ← γᵢ/mᵢ².

Feature mᵢ γᵢ new αᵢ prior SD 1/√αᵢ
relevant 3.0 0.9 0.1 3.2 (wide)
irrelevant 0.01 0.01 100 0.1
after more rounds → 0 → 0 → ∞ → 0 (pruned)

A large weight that the data pin down keeps a wide prior. A tiny, poorly determined weight gets an ever-narrower prior, which shrinks it further: a self-reinforcing switch-off.

The steps in plain English:

  1. Start with all αᵢ = 1.
  2. Compute the posterior (as in D1.9).
  3. Update each αᵢ and the noise precision.
  4. Drop features whose αᵢ exceeds a threshold, such as 10⁴.
  5. Repeat until nothing changes.
📝 Quick check (Level 1)
0/3 answered
  1. 1. αᵢ for γᵢ = 0.9 and mᵢ = 3?
  2. 2. A huge αᵢ means the prior SD is…
  3. 3. γᵢ near 1 means…

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 35 minUndergraduate students and practising engineers.

Model and updates

Model:

  • y = Φw + ε, with ε ~ N(0, β⁻¹I);
  • prior wᵢ ~ N(0, αᵢ⁻¹), independent;
  • prior precision matrix A = diag(α).

Posterior:

  • S = (A + βΦᵀΦ)⁻¹;
  • m = βSΦᵀy.

Evidence maximisation (MacKay, 1992):

  • γᵢ = 1 − αᵢSᵢᵢ;
  • αᵢ ← γᵢ/mᵢ²;
  • β ← (N − Σγᵢ)/‖y − Φm‖².

Prune features with αᵢ above a threshold (scikit-learn’s threshold_lambda = 10⁴). Faster alternatives are Tipping and Faul’s sequential algorithm (2003) and EM updates αᵢ = 1/(mᵢ² + Sᵢᵢ).

from sklearn.linear_model import ARDRegression
model = ARDRegression(threshold_lambda=1e4).fit(X, y)
print((model.lambda_ < 1e4).sum(), "features kept")   # sklearn: lambda_ = per-weight precisions α
mean, std = model.predict(X_new, return_std=True)

Hyperparameters: essentially none (the pruning threshold, iteration count). Use it when you want sparse Bayesian models with uncertainty and no tuning. Prefer the lasso or elastic net for very large p (ARD costs O(p³) per iteration) or when its occasional overfitting of α is a concern.

🐍 Exercise 1: automatic relevance determination
Implement ARD with per-weight prior precisions updated by MacKay's fixed-point rules, noise-precision updates and pruning at α > 10⁴; compare with Bayesian ridge (one shared α) on a problem with 3 relevant features out of 12.
📝 Quick check (Level 2)
0/3 answered
  1. 1. The ARD prior covariance is…
  2. 2. Cost per iteration with p features (p < N):
  3. 3. In sklearn's ARDRegression, the per-weight precisions are…

Level 3: Advanced

★★★★☆ Advanced⏱ 35 minGraduate level, with full derivations and proofs.

Why the evidence prunes

Marginal likelihood view. With w integrated out, y ~ N(0, C), where C = β⁻¹I + ΦA⁻¹Φᵀ. Each αᵢ controls how much column φᵢ inflates the covariance. Including a column that does not align with y adds volume to C (lowering the normalising term) without improving the fit, so the evidence is maximised by αᵢ = ∞.

For a single basis vector, the optimum has a closed form:

  • αᵢ = sᵢ²/(qᵢ² − sᵢ) if qᵢ² > sᵢ, and ∞ otherwise.
  • Here sᵢ and qᵢ measure the vector’s “sparsity” and “quality” given the others (Tipping and Faul, 2003).

Connections:

  • Relevance vector machine (D5.55): ARD over kernel basis functions centred on the data.
  • Gaussian processes with ARD kernels: one length scale per input dimension.
  • Sparse Bayesian learning: a non-convex but often sparser alternative to L1 (Wipf and Rao, 2004).

Weaknesses:

  • Non-convex: results depend on initialisation, though there are fewer local optima than with L0.
  • The evidence is optimised on the training data, so with few samples ARD can overfit the αᵢ, keeping tiny noise weights or pruning weak true ones.
  • Cubic cost in the number of active features.
  • Point estimates of α ignore their uncertainty.

Interview questions.

  • How does ARD differ from the lasso? It is a Bayesian, non-convex, tuning-free relevance prior with per-weight precisions, versus a convex L1 penalty with one λ chosen by validation.
  • What does an ARD length scale in a GP tell you? A large length scale means the output barely varies with that input, so the input is irrelevant.
📝 Quick check (Level 3)
0/3 answered
  1. 1. ARD optimisation is…
  2. 2. The relevance vector machine applies ARD to…
  3. 3. In a GP with ARD kernel, a huge length scale for input j means…

Level 4: Expert

★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.

ARD against the lasso and Bayesian ridge

History. MacKay (1992, 1994) and Neal (1996) introduced ARD for neural networks. Tipping (2001) turned it into the relevance vector machine, and Tipping and Faul (2003) gave a fast sequential algorithm. Wipf and Rao (2004) analysed sparse Bayesian learning’s sparsity properties.

Exercise 1. With 3 relevant features among 12 (n = 80):

  • ARD keeps 6 features, including all 3 true ones; the 3 noise survivors have weights below 0.1.
  • It estimates σ̂ = 0.44 (true 0.5).
  • Its coefficient error (0.044) beats Bayesian ridge (0.065), which keeps all 12 weights non-zero.

Exercise 2: 4 relevant features among 40 (σ = 1; means over 10 datasets). The lasso’s λ is tuned on 100 extra validation examples; ARD and Bayesian ridge use only the n training points.

n ARD test MSE Lasso test MSE Bayesian ridge test MSE False features with |w| > 0.05: ARD / lasso / ridge
30 2.45 1.94 5.82 9.5 / 6.3 / 31.2
60 1.53 1.39 2.57 9.5 / 5.6 / 27.3
120 1.15 1.09 1.39 8.4 / 3.7 / 23.5
  • Without any tuning, ARD more than halves the error of Bayesian ridge at n = 30, and keeps all 4 true features at every n.
  • It removes most noise features, but leaves about 8–10 with small weights. Its evidence-optimised priors partly overfit the training sample.
  • The validation-tuned lasso does slightly better, but it uses 100 extra labelled examples for tuning. Given the same data budget, the comparison is closer.
  • In practice, ARD is attractive when labelled data are too scarce to set aside a validation set and calibrated uncertainty is wanted.
🐍 Exercise 2 (research): ARD, lasso and Bayesian ridge on sparse problems
For n = 30, 60 and 120 examples with 4 relevant features among 40, compare ARD, a validation-tuned lasso (FISTA) and Bayesian ridge on test error, true features kept and noise features kept.

ARD in AI, robotics and aerospace

  • Gaussian-process surrogates: ARD length scales rank design variables (geometry, Mach number, angle of attack) by influence.
  • Sparse system identification: sparse Bayesian learning selects dynamics terms with uncertainty.
  • Sensor relevance: prune channels that add no predictive value.
  • Relevance vector machines: sparse kernel models for embedded prediction.

References

  1. D. J. C. MacKay (1992). “Bayesian interpolation.” Neural Computation 4(3).
  2. R. M. Neal (1996). Bayesian Learning for Neural Networks. Springer.
  3. M. E. Tipping (2001). “Sparse Bayesian learning and the relevance vector machine.” JMLR 1.
  4. M. E. Tipping, A. C. Faul (2003). “Fast marginal likelihood maximisation for sparse Bayesian models.” AISTATS.
  5. D. P. Wipf, B. D. Rao (2004). “Sparse Bayesian learning for basis selection.” IEEE Trans. Signal Processing 52(8).