On Discriminative vs. Generative Classifiers: A comparison of logistic regression and naive Bayes
A. NgMichael I. Jordan
Demonstrates that while discriminative classifiers achieve lower asymptotic error, generative models require only logarithmic sample complexity to approach their asymptotic performance, explaining why naive Bayes frequently outperforms logistic regression on smaller training sets.
The article addresses the common view that discriminative classifiers such as logistic regression should almost always be preferred to generative ones such as naive Bayes, along with the related belief that the number of training examples needed grows linearly with the number of model parameters. These assumptions matter because many practical classification tasks involve limited data, and choosing the wrong approach can lead to unnecessarily high error rates.
The article set out to compare a generative-discriminative pair of classifiers both theoretically and empirically, focusing on how their error rates behave as the training set size increases.
The authors performed a theoretical analysis of convergence rates for naive Bayes and logistic regression under standard assumptions, then tested the predictions on fifteen datasets from the UCI repository using repeated random train-test splits.
The analysis shows that logistic regression reaches a lower asymptotic error rate, yet naive Bayes approaches its (higher) asymptotic error after only a logarithmic number of examples rather than a linear number. Experiments confirm two distinct performance regimes: with small training sets naive Bayes often yields lower error, while with larger sets logistic regression overtakes it; the crossover occurs at modest sizes in most datasets.
These results indicate that the preferred algorithm depends on available data volume, so practitioners can achieve better accuracy by matching the method to the scale of the problem rather than defaulting to one family. They also suggest that hybrid methods could combine the fast initial improvement of generative models with the superior final accuracy of discriminative ones.
The main limitations are that the analysis applies to specific generative-discriminative pairs and assumes a sufficient fraction of relevant features; results on very small or linearly separable datasets were sometimes inconclusive. The findings rest on both theory and consistent experimental patterns, supporting moderate-to-high confidence for the regimes described.
- Paper: On the Optimality of the Simple Bayesian Classifier under Zero-One Loss, Pedro M. Domingos et al. (1997). It provides the foundational theoretical and empirical analysis of why Naive Bayes performs remarkably well under zero-one loss despite severe violations of feature independence.
- Paper: Bayesian Network Classifiers, NIR FRIEDMAN et al. (1997). It analyzes the performance trade-offs and structural dependencies of Bayesian network classifiers relative to Naive Bayes across standard benchmark datasets.
- Paper: A comparison of event models for naive bayes text classification, Andrew McCallum et al. (1998). It details how generative model formulations for Naive Bayes behave across varying feature dimensionalities and data scales.
- Paper: Estimating Continuous Distributions in Bayesian Classifiers, George H. John et al. (1995). It explores distributional assumptions in Naive Bayes and demonstrates how probabilistic modeling choices influence classification accuracy.
- Paper: Supervised and Unsupervised Discretization of Continuous Features, James Dougherty et al. (1995). It demonstrates how continuous feature handling and representation affect the empirical performance of Naive Bayes classifiers.
- Paper: Text Classification from Labeled and Unlabeled Documents using EM, K. Nigam et al. (2000). It examines the sample efficiency of generative Naive Bayes modeling when learning from limited labeled data.
- Paper: Feature selection, L1 vs. L2 regularization, and rotational invariance, A. Ng (2004). It extends the sample complexity analysis of logistic regression to high-dimensional regimes, analyzing how L1 versus L2 regularization affects convergence rates.
- Paper: Predicting good probabilities with supervised learning, Alexandru Niculescu-Mizil et al. (2005). It evaluates the empirical probability calibration of logistic regression and Naive Bayes, explaining how their respective loss formulations distort posterior probabilities.
- Paper: An empirical comparison of supervised learning algorithms, R. Caruana et al. (2006). It conducts a broader empirical benchmark comparing logistic regression and Naive Bayes against modern ensemble methods across diverse evaluation metrics.
- Paper: Statistical Comparisons of Classifiers over Multiple Data Sets, Janez Demšar (2006). It establishes robust non-parametric statistical methodologies for evaluating and comparing classification algorithms across multiple benchmark datasets.
- Paper: Thumbs up? Sentiment Classification using Machine Learning Techniques, Bo Pang et al. (2002). It empirically tests generative Naive Bayes and discriminative maximum entropy models on real-world text classification tasks.
- Paper: In Defense of One-Vs-All Classification, Ryan Rifkin et al. (2004). It builds on empirical classification baselines to investigate whether simple discriminative setups rival complex multiclass architectures.
- Paper: Do we need hundreds of classifiers to solve real world classification problems?, Manuel Fernández Delgado et al. (2014). It expands the comparative evaluation of classifier families across hundreds of real-world datasets to identify overarching empirical performance trends.
