Lyapunov-Driven Optimistic Learning for Online Scheduling with Multi-Stage Tasks

Yutong Huang, Xin LiuNeurIPS 2026

TL;DR

Allocating shared resources to a stream of complex, multi-step tasks—like scheduling jobs in a cloud cluster or serving videos to users—requires maximizing your long-term "bang for your buck" (cumulative reward divided by cumulative cost). Existing reinforcement learning methods struggle when both task dynamics and arrival patterns are unknown, especially in large state spaces. This paper introduces COLD, an algorithm that cleanly untangles long-term efficiency tracking from short-term task learning, achieving mathematically optimal learning rates that scale to huge or continuous state spaces.

What Problem Does This Paper Address?

Imagine running a shared cloud platform. Different types of jobs arrive one after another, competing for limited compute and memory. Each job isn't just a one-off decision; it unfolds over multiple stages—say, data loading, distributed processing, and aggregation—where early resource choices ripple into later stages. Your goal isn't merely to rack up high rewards, nor just to minimize costs, but to maximize overall system efficiency: the long-term ratio of total reward to total cost across thousands of arriving tasks.

This creates a double bind:

  1. Intra-task dependence: Inside each task, you face an unknown Markov Decision Process (MDP) where actions affect future states.
  2. Inter-task dependence: Across tasks, you have to optimize a non-additive fraction ($\sum \text{Rewards} / \sum \text{Costs}$) without knowing the statistical distribution of incoming task types.

Previously, researchers tackled either multi-stage MDPs or sequential ratio optimization in isolation. The closest prior attempt to combine them ($\text{RM}^2\text{VI}$) suffered from slow learning guarantees ($\mathcal{O}(T^{3/4})$ regret over $T$ steps) and relied on tabular lookups, meaning it broke down when state spaces got large or continuous.

Methods

The authors propose COLD (Contextual Optimistic Lyapunov Decomposition), a two-layered framework that separates cross-task ratio control from within-task value learning:

  • Adaptive Lyapunov Optimization (New decoupling mechanism): Ratios are notoriously annoying to optimize directly because costs sit in the denominator. Drawing on renewal theory, COLD introduces a "virtual queue" ($J_k$) and a dynamically adjusted cost target ($1/\gamma_k$). If recent tasks burn too many resources relative to the target, the virtual queue grows, making the algorithm more cost-conscious on future tasks. This converts the global ratio objective into a neat, additive per-episode score: $\text{Reward} - \text{Queue} \times \text{Cost}$.
  • Double-Optimistic Linear LSVI-UCB (Adapted from standard RL): Instead of maintaining giant tables for every state, COLD uses linear function approximation over a shared feature map of dimension $d$. To encourage exploration inside each task, it adapts Least-Squares Value Iteration (LSVI) with a "double-optimistic" twist: it adds an uncertainty bonus to reward estimates and subtracts a bonus from cost estimates, making uncertain actions look maximally efficient.
  • Softmax Policy Smoothing (Technical stabilizer): Normally, an RL agent greedily picks the action with the highest score. However, if two actions are nearly tied, tiny estimation errors can cause wild policy flips, ruining theoretical convergence guarantees. COLD replaces hard argmax selection with a smooth softmax distribution, keeping policy updates continuous with only a tiny, controlled approximation gap.

Datasets

The authors evaluate COLD on two setups:

  • Synthetic Multi-Task Linear MDP: A custom testbed with $M=4$ task types, $|S|=20$ states, $A=10$ actions, feature dimension $d=6$, and horizon $H=5$, run for $K=15,000$ episodes.
  • KuaiRand Empirical MDP: Built from real-world short-video interaction logs (KuaiRand dataset). User activity groups represent task types, discretized engagement signals form states, and video categories are actions ($H=5, K=5,000$). The goal is maximizing "engagement efficiency": watch time (plus optional bonuses for clicks, likes, comments, and follows) divided by video duration.

Key Insights and Ideas

  • Decoupling unlocks optimal learning rates: Prior work tangled ratio estimation directly with value learning, causing errors to compound. By using a virtual queue, COLD isolates cross-task ratio tracking into telescoping boundary terms, leaving standard RL concentration math to handle the statistical estimation error independently.
  • Greedy local ratios fail globally: A natural baseline is to simply reward the RL agent with the immediate ratio $r_h / c_h$ at every step. The KuaiRand experiments show this performs poorly—maximizing the sum of step-by-step ratios is mathematically very different from maximizing the ratio of long-term sums.
  • Escaping the curse of dimensionality: Because task transitions and rewards share a $d$-dimensional feature representation, COLD's complexity depends on feature dimension $d$ rather than the raw number of states $|S|$, while action space size $A$ only shows up inside a gentle logarithm.

Key Results

  • Theoretical Regret: COLD proves a cumulative regret bound of $\tilde{\mathcal{O}}(\sqrt{M d^3 H^3 T})$ over $T = KH$ steps. This improves the time-horizon dependence from prior work's $\mathcal{O}(T^{3/4})$ down to $\sqrt{T}$—which is information-theoretically optimal—while dropping explicit state-space scaling.
  • Empirical Performance: Across 20 trials on both the synthetic MDP and all three reward variants of the KuaiRand benchmark, COLD consistently achieves the highest cumulative reward-to-cost ratio. On synthetic data, linear generalization helps Ratio-LSVI-UCB start fast before plateauing, while tabular $\text{RM}^2\text{VI}$ starts slow before catching up; COLD captures the best of both worlds from start to finish.

Limitations and Future Work

  • Finite action spaces & stationary arrivals: The theoretical guarantees currently require a finite number of actions and assume task types arrive i.i.d. from a stationary distribution. Extending COLD to continuous action spaces, shifting task distributions, or adversarial arrivals remains open.
  • Linearity assumption: While more flexible than tabular MDPs, COLD assumes rewards, costs, and transitions are linear in a known feature map. However, because the Lyapunov layer doesn't care how values are estimated, the authors note their modular proof could likely be extended to generalized linear models or deep neural networks in future work.

Summary updated

Abstract

We study online scheduling in a shared-resource system where tasks of different types arrive sequentially and compete for limited resources. Each task is modeled as an $H$-stage episodic Markov decision process, which captures the sequential resource-allocation decisions made within the task. At the system level, the learner must coordinate resource sharing across tasks to maximize the long-term ratio of cumulative reward to cumulative cost over $K$ tasks, without knowledge of the task distribution. The key challenges are coupled intra-task Markovian dynamics and inter-task ratio maximization, further complicated by unknown models and large or continuous state spaces. To address these challenges, we propose Contextual Optimistic Lyapunov Decomposition (COLD), a Lyapunov-driven optimistic learning algorithm. COLD converts the long-term ratio objective into a queue-adjusted per-task surrogate, thereby decoupling reward-cost optimization from statistical value estimation. It uses double-optimistic least-squares value iteration to estimate reward and cost values under linear function approximation, and a softmax policy to smooth the greedy update with only a controlled approximation error. We prove a regret bound of $\tilde{\mathcal{O}}(\sqrt{Md^3H^3T})$, where $M$ is the number of task types, $d$ is the feature dimension, $H$ is the episode horizon, and $T=KH$ is the number of interaction steps. The $\sqrt{T}$ dependence is order-optimal up to logarithmic factors, and the bound scales with the feature dimension rather than the size of the state space. Experiments on synthetic environments and an empirical KuaiRand-based MDP demonstrate the effectiveness of the proposed method.
BibTeX
@inproceedings{huang2026lyapunov,
  author = {Yutong Huang and Xin Liu},
  title = {{Lyapunov-Driven Optimistic Learning for Online Scheduling with Multi-Stage Tasks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=XPHswP8j6l},
}
Figure