Adaptive ML Task Batching for Latency-Energy Tradeoffs
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Machine learning tasks in batch processing face challenges in optimizing latency and energy consumption, as existing methods struggle to balance these competing demands effectively, particularly in latency-sensitive applications like autonomous driving where delayed results can be stale and inefficient energy use is a concern.
Innovation Solution
A batching system that dynamically adjusts batch sizes and execution timing using a probabilistic Markov chain model to evaluate costs associated with latency and energy consumption, allowing for real-time decision-making to optimize batch processing based on current queue states and predefined parameters.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Use of energy by moving object
If batch-based computation is used to accelerate machine learning tasks, then energy consumption is reduced through efficient hardware utilization, but latency increases due to waiting for batch accumulation
Solution Approach 1:
The patent implements dynamic batch size adjustment where the batch size is not fixed but adapts based on real-time queue state evaluation. The system uses a probabilistic model to determine optimal batch sizes dynamically, allowing it to switch between smaller batches (for low latency) and larger batches (for energy efficiency) depending on current conditions, thus resolving the contradiction between latency and energy consumption
Solution Approach 2:
The system changes the parameter of batch size based on queue state evaluation. By monitoring the number of tasks in the queue and using a probabilistic model to evaluate costs, the system adjusts the batch size parameter to optimize the trade-off between latency and energy consumption, transforming a static parameter into a dynamic one that responds to system conditions
2Use of energy by moving object
If larger batch sizes are used to improve energy efficiency, then energy consumption per task decreases, but latency increases due to longer processing times
Solution Approach 1:
The system dynamically adjusts batch size based on real-time queue state rather than using a fixed large batch size. When the queue is deep, it can afford to accumulate more tasks for energy efficiency; when the queue is shallow or tasks are time-sensitive, it reduces batch size to minimize latency, thus dynamically optimizing the energy-latency trade-off
Solution Approach 2:
The system continuously monitors the queue state and uses a probabilistic model to evaluate the cost of executing batches of different sizes. This feedback mechanism allows the system to make informed decisions about batch size selection, adjusting based on the current number of tasks in the queue and the expected latency-energy trade-off
3Loss of time
If smaller batch sizes are used to reduce latency, then response time improves, but energy consumption increases due to less efficient hardware utilization
Solution Approach 1:
Rather than consistently using small batch sizes, the system dynamically adjusts batch size based on queue state. When tasks accumulate in the queue, the system increases batch size to improve energy efficiency; when the queue is empty or has few tasks, it uses smaller batches to minimize latency, thus dynamically optimizing both latency and energy consumption
Data Source
AI summary
Systems, methods, and other embodiments described herein relate to improving the processing of machine learning (ML) tasks by selectively adapting batch sizes and execution timing to optimize latency and energy consumption. In one embodiment, a method includes receiving, in a queue, tasks for execution, the tasks being requests to execute a machine-learning model. The method includes evaluating a current state of the queue according to a batching model to determine when to execute a batch of the tasks by generating a cost of executing the batch at a current time. The method includes, responsive to determining that the cost satisfies a batch threshold, controlling a batching processor to execute the batch using the machine-learning model.


