TL;DR
This paper introduces E4, a novel framework for energy-efficient deep neural network (DNN) inference on edge devices for video analytics. E4 combines an "early-exit" mechanism that intelligently stops DNN processing based on frame complexity with dynamic voltage and frequency scaling (DVFS) to optimize CPU and GPU power usage, achieving significant energy savings and speedups without sacrificing accuracy.
What Problem Does This Paper Address?
Edge devices are increasingly used for video analytics due to privacy and latency concerns. However, running complex DNN models on these resource-constrained devices is power-hungry. Existing solutions often focus on optimizing inference latency and accuracy, neglecting energy efficiency. Furthermore, they fail to account for the varying complexity of video frames (e.g., number of objects) and the diversity of DNN models, leading to suboptimal performance. This paper aims to bridge this gap by proposing a framework that dynamically adapts DNN inference and power management to the specific demands of edge video analytics.
Methods
The E4 framework has four key components:
- Accumulated Feature Pooling: This module aggregates features from a sequence of T video frames to capture temporal relationships, helping to understand video frame complexity. It uses a feature extractor (EfficientNet-B0 or MobileNet-v2) and a two-layer LSTM for temporal aggregation.
- Attention-Based Early-Exit: An attention module analyzes the aggregated features to determine the optimal "exit point" for a DNN. This allows the inference process to terminate early for simpler frames or layers, saving computation. The early-exit decision is made by a gate unit that evaluates frame complexity and attention weights.
- Just-In-Time (JIT) Profiler with Coordinate Descent Search (CDS): Once an early-exit point is determined, the JIT profiler dynamically adjusts CPU and GPU clock frequencies for each layer before the exit point. It employs a CDS algorithm to efficiently search for the optimal frequency pair that minimizes energy consumption while meeting latency requirements. CDS iteratively optimizes one dimension (CPU or GPU frequency for a layer) at a time, keeping others fixed.
- DVFS Governor: This component manages the dynamic voltage and frequency scaling of the CPU and GPU, working in conjunction with the JIT profiler to implement the power management strategy.
Datasets
The paper uses two large-scale datasets for training and evaluation:
- ActivityNet-v1.3: A long-range action recognition dataset with 20,000 videos and 200 classes.
- Mini-Kinetics: A short-range action recognition dataset featuring 200 classes from the Kinetics dataset.
The DNN models used are EfficientNet-B0 and MobileNet-v2, pretrained on ImageNet.
Key Insights and Ideas
- Video Frame Complexity is Crucial: The paper highlights that not all video frames require the full computational power of a DNN. Dynamically adapting inference based on frame complexity is key to energy efficiency.
- Early-Exit and DVFS are Synergistic: Combining early-exit mechanisms with DVFS is more effective than either approach alone. Early-exit reduces the computational load, and DVFS fine-tunes power consumption for the remaining computation.
- Attention for Intelligent Early-Exit: Using an attention module to analyze spatio-temporal correlations allows for a more nuanced determination of early-exit points, leading to better performance.
- CDS for Efficient Power Optimization: Coordinate Descent Search proves to be an efficient method for finding near-optimal CPU/GPU frequency settings, balancing speed and energy savings.
- High-Performance Devices Benefit More: The framework shows greater performance improvements on edge devices with higher computing power, likely due to a larger frequency range for optimization.
Key Results
E4 demonstrates significant improvements over state-of-the-art methods:
- Speedup: Up to 2.8x speedup.
- Energy Saving: Up to 26% average energy saving.
- Accuracy: Maintains high accuracy, with minimal loss (e.g., <1% on Jetson AGX Orin with varying frame rates).
- Memory Usage: Reduced memory usage by up to 55% compared to baselines without early exit.
- Performance across Devices: E4 consistently outperforms baselines (EENet, zTT, Ring-DVFS, E4-R) across five heterogeneous edge devices.
Limitations and Future Work
- Training Overhead: The paper mentions that the JIT profiler introduces some overhead, although it is evaluated as minimal.
- Temporal Information Reliance: The effectiveness of the attention-based early-exit relies on capturing temporal correlations. For single, highly complex frames, the benefit might be less pronounced.
- Future Work: The authors hope E4 will inspire the community to consider energy as a first-class resource in DNN optimization for edge video analytics. Further research could explore more sophisticated attention mechanisms, adaptive DNN architectures, and broader applications beyond video analytics.
Summary updated