[Paper Review] Re-parameterizing Your Optimizers rather than Architectures
The paper introduces RepOptimizers that inject model-specific prior knowledge into the optimizer, enabling a simple VGG-style model (RepOpt-VGG) to match or exceed the performance of well-designed nets with faster training and easier quantization.
The well-designed structures in neural networks reflect the prior knowledge incorporated into the models. However, though different models have various priors, we are used to training them with model-agnostic optimizers such as SGD. In this paper, we propose to incorporate model-specific prior knowledge into optimizers by modifying the gradients according to a set of model-specific hyper-parameters. Such a methodology is referred to as Gradient Re-parameterization, and the optimizers are named RepOptimizers. For the extreme simplicity of model structure, we focus on a VGG-style plain model and showcase that such a simple model trained with a RepOptimizer, which is referred to as RepOpt-VGG, performs on par with or better than the recent well-designed models. From a practical perspective, RepOpt-VGG is a favorable base model because of its simple structure, high inference speed and training efficiency. Compared to Structural Re-parameterization, which adds priors into models via constructing extra training-time structures, RepOptimizers require no extra forward/backward computations and solve the problem of quantization. We hope to spark further research beyond the realms of model structure design. Code and models \url{https://github.com/DingXiaoH/RepOptimizers}.
Motivation & Objective
- Motivate the use of model-specific priors within optimizers rather than relying solely on architectural design.
- Propose Gradient Re-parameterization (GR) and RepOptimizers as a way to encode priors into gradient updates.
- Demonstrate RepOpt-VGG's competitive accuracy and superior training efficiency compared to state-of-the-art models.
- Highlight practical benefits including training speed, memory efficiency, and quantization friendliness.
Proposed method
- Define Gradient Re-parameterization (GR) to modify gradients with model-specific hyper-parameters.
- Introduce RepOptimizers that implement GR without extra forward/backward computations or new parameters.
- Use a CSLA (Constant-Scale Linear Addition) block to conceptually relate structured priors to gradient multipliers (Grad Mult).
- Instantiate RepOpt-VGG by replacing BN in a RepVGG-style block with trainable/non-trainable channel-wise scales and deriving Grad Mults.
- Employ Hyper-Search to obtain the Grad Mult hyper-parameters by training a small auxiliary model on a search dataset.
- Train RepOpt-VGG on ImageNet and compare to RepVGG and EfficientNets to assess accuracy, training speed, memory use, and quantization behavior.
Experimental results
Research questions
- RQ1Can model-specific priors be effectively incorporated into optimizers to improve training dynamics for non-convex deep nets?
- RQ2How does a plain VGG-style model perform when trained with a RepOptimizer compared to well-designed architectures?
- RQ3Are RepOptimizers transferable across datasets (i.e., dataset-agnostic) and what is the impact on quantization?
Key findings
- RepOpt-VGG matches or surpasses several well-designed models in accuracy while being faster to train and memory-efficient.
- RepOpt-VGG trains around 1.8x faster than RepVGG on comparable hardware with similar accuracy (Table 2).
- RepOpt-VGG demonstrates competitive Top-1 accuracy against EfficientNets while using simpler architecture and training dynamics (Table 3).
- Ablation studies show that both initialization and gradient modification are essential for CSLA-based RepOptimizers to preserve equivalence with the target structure (Table 4).
- Hyper-Search on CIFAR-100 yields Grad Mults that transfer to ImageNet, supporting the notion that RepOptimizers are model-specific but dataset-agnostic (Tables 5 and 6).
- On downstream tasks, RepOpt-VGG performs comparably to RepVGG in COCO detection and Cityscapes segmentation (Table 7).
- RepOpt-VGG exhibits much friendlier quantization behavior than structurally re-parameterized models, with only ~2.5% accuracy drop under INT8 PTQ (Table 8).
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.