Skip to content
BIASED

The relevance vector machine

Block 1 of 7~3 min

One precision per weight

The topic Bayesian linear regression gave every weight the same prior N(0,α−1)\mathcal N(0, \alpha^{-1}) and chose α\alpha and β\beta by maximizing the evidence. One α\alpha shrinks all weights alike: a useful basis function and a useless one pay the same penalty. When we suspect that only a few of many basis functions matter, we want the data to tell us which.

The fix takes one line. Give each weight its own precision:

p(w∣α)=∏i=1MN(wi∣0,αi−1)=N(w∣0,A−1),A=diag⁡(α1,…,αM).p(w \mid \alpha) = \prod_{i=1}^{M} \mathcal N\big(w_i \mid 0, \alpha_i^{-1}\big) = \mathcal N\big(w \mid 0, A^{-1}\big), \qquad A = \operatorname{diag}(\alpha_1, \dots, \alpha_M).

This prior is called automatic relevance determination (ARD). A large αi\alpha_i is a narrow prior that holds wiw_i close to zero; a small αi\alpha_i is a wide one that lets wiw_i go wherever the data push it.

The rest of the model is unchanged: t=Φw+εt = \Phi w + \varepsilon with ε∼N(0,β−1I)\varepsilon \sim \mathcal N(0, \beta^{-1} I). The n×Mn \times M design matrix has entries Φki=φi(xk)\Phi_{ki} = \varphi_i(x_k): row kk is the feature vector φ(xk)⊤\varphi(x_k)^\top of object xkx_k, and column ϕi\phi_i is basis function φi\varphi_i evaluated on all nn objects. The posterior is computed exactly as before, with αI\alpha I replaced by AA:

p(w∣t)=N(w∣m,Σ),Σ=(A+β Φ⊤Φ)−1,m=β Σ Φ⊤t.p(w \mid t) = \mathcal N(w \mid m, \Sigma), \qquad \Sigma = \big(A + \beta\, \Phi^\top \Phi\big)^{-1}, \qquad m = \beta\, \Sigma\, \Phi^\top t.

These are SNS_N and mNm_N of the previous topic. We drop the subscript NN so that a subscript can name a weight: mim_i, Σii\Sigma_{ii}.

The running example is the three points of the topic Bayesian linear regression, x=(−1,0,1)x = (-1, 0, 1) and t=(−1,1,2)t = (-1, 1, 2), now with three basis functions: a constant, the slope and a quadratic term,

φ(x)=(1, x, 3x2−2),Φ=(1−1110−2111).\varphi(x) = \big(1,\ x,\ 3x^2 - 2\big), \qquad \Phi = \begin{pmatrix} 1 & -1 & 1 \\ 1 & 0 & -2 \\ 1 & 1 & 1 \end{pmatrix}.

The quadratic term is shifted so that its column is orthogonal to the other two. All three columns are orthogonal, so Φ⊤Φ=diag⁡(3,2,6)\Phi^\top \Phi = \operatorname{diag}(3, 2, 6), the matrix Σ\Sigma is diagonal, and every weight is computed on its own:

Σii=1αi+β∥ϕi∥2,mi=β ϕi⊤tαi+β∥ϕi∥2.\Sigma_{ii} = \frac{1}{\alpha_i + \beta \lVert \phi_i \rVert^2}, \qquad m_i = \frac{\beta\, \phi_i^\top t}{\alpha_i + \beta \lVert \phi_i \rVert^2}.

We index the weights w0,w1,w2w_0, w_1, w_2 for the constant, the slope and the quadratic term. Here Φ⊤t=(2,3,−1)\Phi^\top t = (2, 3, -1). Take β=1\beta = 1 and start every αi\alpha_i at 22. Then Σ=diag⁡(1/5,1/4,1/8)\Sigma = \operatorname{diag}(1/5, 1/4, 1/8) and m=(0.4, 0.75, −0.125)m = (0.4,\ 0.75,\ -0.125). Least squares would use all three weights, (2/3, 3/2, −1/6)(2/3,\ 3/2,\ -1/6), and pass through every point: three functions, three points. The question of this topic is whether the data justify the curvature.

Answers are saved on the server and tied to this browser until you sign in.