Egeria: Efficient DNN Training with Knowledge-Guided Layer Freezing

Yiding Wang, Decang Sun, Kai Chen, Fan Lai, Mosharaf Chowdhury

Abstract

Modern Deep Neural Network (DNN) training is resource-intensive, incurring high costs and energy consumption. While different layers in a DNN converge at varying rates, existing methods for freezing converged layers often compromise model accuracy. This paper introduces Egeria, a training system that leverages a novel "training plasticity" metric to dynamically identify and freeze converged layers. By employing a lightweight, quantized reference model and efficient activation caching, Egeria achieves significant speedups (19%–43%) across diverse tasks while maintaining baseline accuracy.

Introduction

The computational demand for training state-of-the-art DNNs continues to grow, leading to substantial financial and environmental costs. A common observation in deep learning is that layers closer to the input (front layers) tend to stabilize earlier than deeper layers. However, identifying the precise moment a layer can be safely frozen without hurting final accuracy remains a challenge. Simple heuristics, such as fixed schedules or gradient-based metrics, often fail to generalize or lead to accuracy degradation.

The Egeria Framework

Egeria addresses the challenge of safe layer freezing through a knowledge-guided approach. The system architecture is split between the GPU, which handles the primary training, and the CPU, which manages the reference model and plasticity evaluation.

Figure 3: The Egeria system architecture, showing the interaction between the GPU training process and the CPU-based knowledge-guided stage.

Training Plasticity and Reference Models

The core of Egeria is the Training Plasticity metric. It quantifies a layer's convergence by measuring the similarity between the intermediate activations of the training model and those of a "reference model." To minimize overhead, Egeria generates this reference model on-the-fly using int8 quantization and runs it asynchronously on available CPUs, ensuring it does not compete for GPU resources.

Figure 5: Visualization of training plasticity and validation accuracy over time. (a) shows the overall trends, while (b) highlights the individual plasticity curves for different layers.

Dynamic Freezing and Activation Caching

Egeria monitors the plasticity of the frontmost active layer. Once the plasticity curve stabilizes—detected via linear least-squares regression—the layer is frozen. To maximize efficiency, Egeria skips both the forward and backward passes for frozen layers by caching their activations to disk. These activations are then prefetched back to the GPU memory for subsequent epochs, overlapping slow disk I/O with GPU computation.

Key Results

Egeria was evaluated on standard benchmarks including ImageNet (ResNet-50), WMT16 (Transformer), and SQuAD (BERT).

  • Significant Speedups: Egeria achieved Time-to-Accuracy (TTA) speedups of 28% on ImageNet (ResNet-50), 43% on WMT16 (Transformer-Base), and 41% on SQuAD (BERT).
  • Accuracy Preservation: Unlike previous freezing methods like AutoFreeze which often suffer a 1%–3% accuracy loss, Egeria consistently matched or slightly exceeded baseline accuracy.
  • Low Overhead: The system overhead for plasticity calculation and reference model maintenance is remarkably low, typically under 1.5% of total training time.

Conclusion and Future Work

Egeria demonstrates that knowledge-guided layer freezing is a viable strategy for accelerating DNN training without sacrificing quality. By exploiting CPU-GPU asymmetry and the predictability of training data sequences, it transforms a heavy computational burden into a manageable I/O task. Future research will focus on finer-grained freezing modules and integrating Egeria with advanced model parallelism techniques.

Summary updated

BibTeX
@inproceedings{wang2023egeria,
  author = {Yiding Wang and Decang Sun and Kai Chen and Fan Lai and Mosharaf Chowdhury},
  title = {{Egeria: Efficient DNN Training with Knowledge-Guided Layer Freezing}},
  booktitle = {EuroSys},
  year = {2023},
  doi = {10.1145/3552326.3587451},
}
Figure