Learning with Adaptive Resource Allocation

Jing Wang, Miao Yu, Peng Zhao, Zhi-Hua Zhou

In real-world machine learning environments, we rarely have the luxury of training just one model at a time with unlimited compute. Imagine a quantitative finance startup or a busy academic lab where multiple researchers are simultaneously trying to train different models on a shared GPU cluster. Each task has its own strict deadline, and standard resource allocation approaches usually fall into two traps: "First-Come, First-Served" (which wastes resources on inefficient early tasks) or "Uniform Allocation" (which spreads resources so thin that no task finishes on time).

To address this, researchers have introduced LARA (Learning with Adaptive Resource Allocation), a novel framework designed to manage multiple machine learning tasks competing for a single, limited pool of computational resources. By combining real-time progress prediction with an efficient search algorithm, LARA strategically allocates compute to maximize the number of tasks that meet their accuracy goals before their deadlines.

The Challenge of CoRE-Learning

The authors define this scenario as the Computational Resource Efficient Learning (CoRE-Learning) problem.

Illustration of multiple users submitting diverse learning tasks with strict deadlines to a shared computational facility.

The core challenge in CoRE-Learning is a "coupling" effect: a system cannot effectively decide how to allocate resources without knowing a task's learning progress, but it cannot observe a task's progress without first allocating resources to it. This creates a high-stakes balancing act where a single bad prediction can lead to a "compounding error," wasting the entire computational budget on a task that was ultimately doomed to fail.

The LARA Framework

The LARA approach tackles this coupling challenge through a three-pillared strategy:

1. Resource Prediction via Weighted Least Squares

Most machine learning loss curves follow a "negative power law" ($loss = a \cdot s^{-b}$). LARA uses an online Weighted Least Squares (WLS) estimator to fit this curve in real-time. Crucially, it applies a discounted factor ($\gamma$) to give more weight to recent data points. Because the most recent training steps are far more indicative of future performance than the very first steps, this recency bias allows LARA to adapt to current training trends and outperform standard extrapolation methods.

Deciding which task gets what fraction of the GPU is a non-convex optimization nightmare. The authors prove a "Parameter Reduction" lemma that simplifies the problem from a complex time-varying schedule to a set of time-invariant parameters. They then implement an Adaptive Binary Tree Search that reduces the search complexity from exponential ($O(2^K)$) to linear ($O(K)$). By prioritizing tasks based on earlier deadlines and lower resource requirements, LARA navigates the massive decision tree almost instantly, making it fast enough to run every second.

3. Prediction-Allocation Balancing

To avoid making drastic allocation decisions based on noisy early data, LARA uses an "Explore-Then-Exploit" (ETE) strategy. It forces a uniform "exploration" phase for every task until a specific data threshold ($H_k$) is met. This ensures the predictor has enough reliable information before the allocator starts playing favorites.

Experimental Setup and Key Insights

The authors evaluated LARA across diverse "mixed task bundles" to simulate a real-world shared facility, including Computer Vision (ViT/ResNet on CIFAR-10), NLP (Attention+LSTM on IMDB), Reinforcement Learning (DAgger+CNN on Montezuma’s Revenge), and Audio Processing (Transformers on Yesno).

One of LARA's biggest strengths revealed during testing is its ability to execute a "Strategic Quit." By identifying difficult-to-complete tasks early, LARA strategically abandons tasks unlikely to hit their deadlines. This frees up resources to ensure other tasks succeed, rather than letting the entire batch fail due to resource starvation.

Key Results

LARA consistently outperformed standard baselines like Uniform Allocation (UA), Shortest Thread First (STF), Least Resources First (LRF), and Earliest Time First (ETF).

Comparison of successful task completions across different allocation strategies.
  • Pure Task Bundle: In a highly constrained scenario with 5 tasks, LARA successfully completed 4 out of 5 tasks. In contrast, UA and STF completed 0 because they over-invested in a single "impossible" task.
  • Mixed Task Bundles: Across varied CV, NLP, and RL tasks, LARA completed significantly more tasks (up to 8 out of 10) compared to greedy strategies like LRF, which only managed 4 out of 10.
  • Scalability and Efficiency: As the number of tasks scaled from 10 to 100 (tested on MNIST), LARA’s success rate remained high and stable. Remarkably, even with 100 concurrent tasks, LARA’s allocation update takes only 0.0007 seconds, meaning the computational overhead of the manager itself is negligible.

Limitations and Future Work

While LARA represents a major step forward for multi-tenant ML clusters, the authors note a few areas for improvement. The current "Explore-Then-Exploit" strategy relies on a manually set threshold ($H_k$). If this threshold is too short, predictions are inaccurate; if too long, compute is wasted.

Future versions might replace this fixed threshold with more sophisticated adaptive "bandit" strategies, such as Upper Confidence Bound (UCB) or Thompson Sampling. Additionally, while the allocation method is proven optimal for a given prediction, providing a strict "learnability guarantee" for the entire end-to-end process remains an open theoretical challenge.

Summary updated

BibTeX
@inproceedings{wang2024learning,
  author = {Jing Wang and Miao Yu and Peng Zhao and Zhi-Hua Zhou},
  title = {{Learning with Adaptive Resource Allocation}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=HPLzSCOecY},
}
Figure