Revisiting Discriminative vs. Generative Classifiers: Theory and Implications

Chenyu Zheng, Guoqiang Wu, Fan Bao, Yue Cao, Chongxuan Li +1 more
2/5/2023
cs.LGcs.AIstat.ML

Official code: ML-GSAI/Revisiting-Dis-vs-Gen-Classifiers (14 stars, MIT, last commit 2023-02-07).

Abstract

A large-scale deep model pre-trained on massive labeled or unlabeled data transfers well to downstream tasks. Linear evaluation freezes parameters in the pre-trained model and trains a linear classifier separately, which is efficient and attractive for transfer. However, little work has investigated the classifier in linear evaluation except for the default logistic regression. Inspired by the statistical efficiency of naive Bayes, the paper revisits the classical topic on discriminative vs. generative classifiers. Theoretically, the paper considers the surrogate loss instead of the zero-one loss in analyses and generalizes the classical results from binary cases to multiclass ones. We show that, under mild assumptions, multiclass naive Bayes requires $O(\log n)$ samples to approach its asymptotic error while the corresponding multiclass logistic regression requires $O(n)$ samples, where $n$ is the feature dimension. To establish it, we present a multiclass $\mathcal{H}$-consistency bound framework and an explicit bound for logistic loss, which are of independent interests. Simulation results on a mixture of Gaussian validate our theoretical findings. Experiments on various pre-trained deep vision models show that naive Bayes consistently converges faster as the number of data increases. Besides, naive Bayes shows promise in few-shot cases and we observe the "two regimes" phenomenon in pre-trained supervised models. Our code is available at https://github.com/ML-GSAI/Revisiting-Dis-vs-Gen-Classifiers.

View on arXivView PDF

Code Implementations(1)

MIT

Official implementation for "Revisiting Discriminative vs. Generative Classifiers: Theory and Implications".

141Shell, PythonFeb 5, 20233 years agoMIT

Similar Papers

Cite this paper

@article{zheng2023revisiting,
  title  = {Revisiting Discriminative vs. Generative Classifiers: Theory and Implications},
  author = {Chenyu Zheng and Guoqiang Wu and Fan Bao and Yue Cao and Chongxuan Li and Jun Zhu},
  year   = {2023},
  eprint = {2302.02334},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2302.02334v2},
  journal = {ICML 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2302.02334.svg)](https://codeofpaper.com/paper/2302.02334)

Discussion