Skip to main content
QUICK REVIEW

[Paper Review] Variational Bayesian inference for linear and logistic regression

Jan Drugowitsch|arXiv (Cornell University)|Oct 21, 2013
Gaussian Processes and Bayesian InferenceComputer Science12 references54 citations
TL;DR

This paper presents a variational Bayesian inference framework for linear and logistic regression with automatic relevance determination (ARD), enabling hierarchical modeling of regression coefficients and hyperparameters. By using conjugate priors (normal-inverse-gamma and gamma hyperpriors), it derives closed-form variational updates that jointly infer coefficient posteriors and hyper-posteriors, enabling model selection via the variational lower bound without cross-validation.

ABSTRACT

The article describe the model, derivation, and implementation of variational Bayesian inference for linear and logistic regression, both with and without automatic relevance determination. It has the dual function of acting as a tutorial for the derivation of variational Bayesian inference for simple models, as well as documenting, and providing brief examples for the MATLAB/Octave functions that implement this inference. These functions are freely available online.

Motivation & Objective

  • To provide a tutorial-style derivation of variational Bayesian inference for simple regression models with hierarchical priors.
  • To implement a scalable, fully Bayesian inference method for linear and logistic regression that includes automatic relevance determination (ARD).
  • To enable model selection by maximizing the variational lower bound, avoiding the need for separate validation sets.
  • To bridge theory and practice by providing a documented MATLAB/Octave implementation of the inference algorithms.
  • To extend standard Bayesian regression by jointly inferring hyperparameters and coefficient posteriors using variational approximation, rather than type-II maximum likelihood.

Proposed method

  • Uses a conjugate normal-inverse-gamma prior on regression coefficients and precision, with a gamma hyperprior on the precision and a gamma hyperprior on the ARD hyperparameter α.
  • Derives variational posterior approximations for weights w, precision τ, and hyperparameter α using mean-field approximation.
  • Employs closed-form update equations for the variational parameters of w, τ, and α, derived via coordinate ascent on the variational lower bound.
  • Applies the same framework to logistic regression using a Laplace approximation to the likelihood, enabling variational inference in the non-conjugate case.
  • Utilizes the variational lower bound as a proxy for model evidence to perform Bayesian model selection across different polynomial orders.
  • Implements the algorithms in the VBLinLogit MATLAB/Octave library, with functions for fitting, prediction, and model comparison.

Experimental results

Research questions

  • RQ1How can variational Bayesian inference be systematically derived and implemented for linear and logistic regression with automatic relevance determination?
  • RQ2Can the variational lower bound serve as an effective criterion for model selection in regression without requiring a validation set?
  • RQ3How does the inclusion of hierarchical hyperpriors on regression coefficients affect coefficient shrinkage and model complexity selection?
  • RQ4What is the performance of variational inference in logistic regression with ARD compared to classical methods like Fisher’s linear discriminant?
  • RQ5How do the proposed inference algorithms compare in terms of predictive accuracy and generalization when applied to polynomial classification tasks?

Key findings

  • The variational lower bound peaks at the true polynomial order (k=2) in the model selection example, correctly identifying model complexity without cross-validation.
  • The Bayesian model with ARD selected a lower-order polynomial (k=3) as optimal, demonstrating effective regularization and avoidance of overfitting.
  • The variational Bayesian classifier achieved a test set error of 18.33%, compared to 19.00% for Fisher’s linear discriminant, indicating better generalization despite higher model complexity in the latter.
  • The predicted class probabilities from the variational Bayesian model closely followed the true class probabilities, even in the presence of noise.
  • The method successfully pruned irrelevant coefficients via ARD, as evidenced by the posterior distribution of α, which favored smaller coefficient variances.
  • The MATLAB/Octave implementation in the VBLinLogit library enables efficient and reproducible inference, with functions for fitting, prediction, and model comparison.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.