In this post, we will explore how Discriminative/Generative and Frequentist/Bayesian algorithms make different decisions about what variables to model probabilistically.
There are a preponderance of ways to characterize Machine Learning algorithms. This is a direct consequence of the rich history, broad applicability and interdisciplinary nature of the field. One of the clearest characterizations is based on the structure of the data and the feedback that the model receives: supervised learning, unsupervised learning, semi-supervised learning and reinforcement learning algorithms all interpret data and receive feedback differently.
For the purpose of simplicity, in this post we will focus exclusively on supervised learning. We define this as follows: given a function that accepts a parameter vector and an input vector and returns an output vector , along with a set of labeled examples where each example is from some distribution over , determine a parameter value such that is a good approximation for for all .
If we make the assumption that there exists some value of such that for any sample drawn from , then there is no need to model , , or probabilistically and we can treat this problem as search or function optimization. However, this scenario is uncommon. More frequently, one or both of the following two scenarios are the case:
- There is “label noise”, or some input values such that for distinct there is a nonzero probability that either or will be drawn from . Alternatively, we can say that for some fixed the probability distribution over the value of is nondegenerate.
- The true function that determines from cannot be expressed as and we choose to model with a probability distribution.
Now let’s assume that we are in one or both of these scenarios. We will need to model the output vector probabilistically in order to find the best value of . However, we have the freedom to determine whether we want to model and/or probabilistically as well.
Generative vs Discriminative
The key distinction between a Discriminative and a Generative Machine Learning algorithm is whether it models probabilistically. A Discriminative supervised Machine Learning algorithm assumes that is fixed and learns the conditional distribution (terms to the right of the semicolon are considered fixed and are not modeled probabilistically). A Generative supervised Machine Learning algorithm probabilistically models and learns the joint distribution . We can use the distribution that a Generative algorithm learns to make predictions of from a fixed with Bayes Rule.
Since Generative algorithms model the joint distribution, we can use them to draw samples from this distribution. This can be useful for developing a better understanding of our data. However, for the task of predicting from , Discriminative models are likely perform best unless there is a very small amount of data. In this paper the authors conclude that:
(a) The Generative model does indeed have a higher asymptotic error (as the number of training examples become large) than the Discriminative model, but (b) The Generative model may also approach its asymptotic error much faster than the Discriminative model – possibly with a number of training examples that is only logarithmic, rather than linear, in the number of parameters.
Frequentist vs Bayesian
A key distinction between a Frequentist and a Bayesian Machine Learning algorithm is whether it models probabilistically. A Frequentist supervised Machine Learning algorithm assumes that is fixed. That is, Frequentist algorithms are based on the assumption that there is some unobserved true value of such that the data is generated by applying noise to the function . In contrast, Bayesian Machine Learning algorithms model probabilistically and operate based on the assumption that the data generation process includes a step where is drawn from some prior distribution.
The fact that Bayesian algorithms assume that the “true” value of is drawn from a distribution makes it easier to incorporate domain knowledge into the model training procedure. For example, if we suspect that the value of one element of will be of a different scale than the value of another element, we can construct a prior distribution that reflects this.
The following diagram, similar to the one here, lays out these characterizations.