Revisit Multinomial Logistic Regression in Deep Learning: Data Dependent Model Initialization for Image Recognition

Bowen Cheng, Rong Xiao, Yandong Guo, Yuxiao Hu, Jianfeng Wang, Lei ZhangarXiv 2018

Introduction

In the standard workflow of transfer learning for computer vision, a pre-trained "backbone" network is adapted to a new task by replacing its final classification layer. Conventionally, this new multinomial logistic regression layer is initialized with random weights. However, this paper argues that such random starts are fundamentally inefficient. They necessitate extremely low learning rates to prevent large gradients from the uninitialized "head" from corrupting the pre-trained features in the "body," leading to slow convergence, susceptibility to local minima, and a higher risk of overfitting on small datasets.

To address these issues, the authors propose the Regularized Gaussian Classifier (RGC), a data-dependent initialization method that provides a mathematically grounded "warm start" for the final layer.

The Regularized Gaussian Classifier (RGC)

While multinomial logistic regression (Softmax with Cross-Entropy loss) does not have a closed-form solution, it can be closely approximated by assuming that the features extracted by the backbone for each class follow a Gaussian distribution.

The RGC method involves three key steps:

  1. Closed-Form Solution: Instead of iterative optimization, class-specific mean vectors and a shared covariance matrix are calculated directly from the training data. This allows for an analytical solution for the weights ($w$) and biases ($b$) of the final layer.
  2. Regularization: To ensure stability in high-dimensional spaces or when data is scarce, a regularization term ($\epsilon I$) is added to the covariance matrix.
  3. Parameter Calibration: The resulting RGC weights are scaled so that the initial loss and gradient magnitudes are compatible with the pre-trained network's existing parameters.

Theoretical Justification: Covariance Convergence

A central assumption of the RGC is that classes share a common covariance matrix. The authors empirically validated this by measuring the Central Moment Discrepancy (CMD) distance between class-specific covariance matrices during training.

Figure 1: CMD distance between class-specific covariance matrices over training iterations. The decreasing distance suggests that features become more class-independent as the model converges.

As shown in Figure 1, the CMD distance decreases significantly as training progresses, indicating that the feature distributions for different classes become increasingly similar in their second-order statistics. This convergence justifies the use of a shared covariance matrix in the RGC initialization.

Empirical Results and Efficiency

The RGC initialization was tested across various tasks, including fine-grained image classification (Flickr-style, Oxford Flower-102) and object detection (PASCAL VOC 2007 using YOLO V2 and Faster R-CNN).

The most striking result is the dramatic increase in training efficiency. In many cases, RGC-initialized models reached the baseline accuracy of randomly initialized models up to 10 times faster.

Figure 3: Comparison of Mean Average Precision (mAP) over iterations for YOLOv2 and Faster R-CNN on PASCAL VOC 2007. RGC initialization (blue) leads to significantly faster convergence and higher final accuracy compared to the random baseline (red).

As illustrated in Figure 3, the RGC-initialized models (blue lines) start at a much higher performance level and converge much more rapidly than the baselines (red lines). Beyond speed, RGC also yielded absolute accuracy improvements, such as a 3.2% increase in top-1 accuracy on the Flickr-style dataset and a 5% mAP improvement on VOC 2007 with extended training.

Conclusion

The Regularized Gaussian Classifier offers a robust, deterministic, and hyperparameter-free alternative to random initialization for transfer learning. By leveraging classical statistical approximations, it effectively shields the model from overfitting and provides a significant head start in the optimization process. While currently limited to classification tasks, the RGC demonstrates that thoughtful, data-dependent initialization is a powerful tool for making deep learning more efficient and accurate.

Summary updated

Abstract

We study in this paper how to initialize the parameters of multinomial logistic regression (a fully connected layer followed with softmax and cross entropy loss), which is widely used in deep neural network (DNN) models for classification problems. As logistic regression is widely known not having a closed-form solution, it is usually randomly initialized, leading to several deficiencies especially in transfer learning where all the layers except for the last task-specific layer are initialized using a pre-trained model. The deficiencies include slow convergence speed, possibility of stuck in local minimum, and the risk of over-fitting. To address those deficiencies, we first study the properties of logistic regression and propose a closed-form approximate solution named regularized Gaussian classifier (RGC). Then we adopt this approximate solution to initialize the task-specific linear layer and demonstrate superior performance over random initialization in terms of both accuracy and convergence speed on various tasks and datasets. For example, for image classification, our approach can reduce the training time by 10 times and achieve 3.2% gain in accuracy for Flickr-style classification. For object detection, our approach can also be 10 times faster in training for the same accuracy, or 5% better in terms of mAP for VOC 2007 with slightly longer training.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Flickr Style · Flickr-styleRGC (regularized Gaussian classifier)Acc (%)42.39%+3.23 vs baselinesplit: test · fine-tuned
Source quote
L257: RGC │ 10000 │ 42.39
PASCAL VOC 2007RGC-initialized YOLO V2 (Darknet-19)mAP at IoU 0.567%split: test
Source quote
L314: With YOLO V2, the RGC initialized model achieves mAP of 41% after 50 iterations of training, and mAP of 67% after 1,000 iterations, which is 10 times faster than the baseline.
PASCAL VOC 2007RGC-initialized Faster R-CNN (ZF backbone)mAP at IoU 0.565%split: test
Source quote
L317: With Faster R-CNN, the RGC initialized model achieves mAP of 44% after 100 iterations of training. Compared with the baseline algorithm, it uses only 2,000 iterations to achieve mAP of 60%, which is 17 times faster. With the same number of 35K iterations, our scheme eventually achieves 65% mAP, which is 4% higher than the baseline in terms of mAP.
PASCAL VOC 2007RGC-initialized Faster R-CNN (ZF backbone)mAP at IoU 0.54%split: test
Source quote
L317: With Faster R-CNN, the RGC initialized model achieves mAP of 44% after 100 iterations of training. Compared with the baseline algorithm, it uses only 2,000 iterations to achieve mAP of 60%, which is 17 times faster. With the same number of 35K iterations, our scheme eventually achieves 65% mAP, which is 4% higher than the baseline in terms of mAP.
Reported baseline / comparator measurements (1)
BenchmarkMethodMetricScoreProtocol / Evidence
Flickr Style · Flickr-styleBaseline [jia2014caffe] baselineAcc (%)39.16%split: test · fine-tuned
Source quote
L254: Baseline \cite{jia2014caffe} │ 100000 │ 39.16
BibTeX
@misc{cheng2018revisit,
  author = {Bowen Cheng and Rong Xiao and Yandong Guo and Yuxiao Hu and Jianfeng Wang and Lei Zhang},
  title = {{Revisit Multinomial Logistic Regression in Deep Learning: Data Dependent Model Initialization for Image Recognition}},
  year = {2018},
  eprint = {1809.06131},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1809.06131},
}
Figure