This paper, presented at NeurIPS 2021, explores a fundamental dilemma faced by anyone from freelancers to ride-hailing drivers: how to choose which tasks to accept when your most precious resource is time. If you take a mediocre job now, you might miss out on a much better one that arrives while you're busy. The authors provide a rigorous mathematical framework and optimal algorithms to navigate this "opportunity cost" in an online learning setting.
TL;DR
The authors introduce an online learning framework for optimal time allocation, where an agent must decide whether to accept or reject sequential task proposals. They develop minimax optimal algorithms that learn the ideal "profitability" threshold even when task distributions and reward functions are initially unknown.
What Problem Does This Paper Address?
The paper tackles the online time allocation problem. Imagine a server receiving computation requests or a driver receiving ride offers. Each task has a duration and a reward. The catch is that the resource (the agent's time) is exclusive: once you accept a task, you are unavailable for its entire duration.
The core challenge is the unknown opportunity cost. To maximize long-term revenue, you shouldn't just accept every task that pays; you should only accept tasks that are "profitable enough" compared to what you might get if you stayed free. However, determining that "profitability threshold" requires knowing the global distribution of all possible tasks—information the agent doesn't have at the start.
This setting differs from standard multi-armed bandits because the "cost" of an action is the time it consumes, and the optimal decision for one task depends on the statistical properties of all other potential tasks.
Methods
The authors model task arrivals as a Poisson process. They use continuous-time dynamic programming to show that the optimal policy is a simple threshold policy: accept a task of duration $x$ if its expected reward $r(x)$ satisfies $r(x)/x \ge c^*$, where $c^*$ is the optimal reward per unit of time.
They propose two main algorithms:
- Algorithm 1 (Known Reward): Used when the agent knows the reward function $r(x)$ but not the distribution of task durations. It estimates $c^*$ by finding the root of an empirical version of the optimality equation.
- Algorithm 2 (Bandit Feedback): A more complex scenario where both the rewards and the duration distributions are unknown. The agent only sees a noisy reward after completing a task. This algorithm uses a regressogram (dividing durations into bins) to estimate the reward function and maintains lower/upper confidence bounds for both the rewards and the threshold $c^*$.
To ensure these are practical, the authors implement them using augmented binary search trees, reducing the computational complexity of each decision to $O(\log n)$.
Datasets
The paper evaluates the algorithms using synthetic "toy" examples rather than real-world datasets. These include:
- Affine Reward Function: $r(x) = x - 0.5$, where profitability increases with duration.
- Concave Reward Function: $r(x) = -0.3x^2 + x - 0.2$, creating a more complex scenario with multiple suboptimal regions.
- Task durations were drawn from uniform and Gaussian distributions.
Key Insights and Ideas
- Global Dependence: The optimal threshold $c^*$ is a global property. Unlike standard contextual bandits where you just want the best arm for the current context, here the "value" of the current context depends on the entire distribution of all possible future contexts.
- Learning from Rejection: A key theoretical "aha moment" (Lemma 4.3) is that the agent can learn the optimal threshold even while declining many tasks. As long as the agent observes the duration of every proposed task (even those rejected), they can accurately estimate the distribution needed to find $c^*$.
- The "Safe" vs. "Greedy" Trade-off: The agent faces a classic exploration-exploitation trade-off. A "safe" policy accepts many tasks to gather data but earns less; a "greedy" policy might reject too many tasks and fail to learn the true potential of the environment.
Key Results
- Minimax Optimality: The authors prove that their algorithms are "optimal" in a formal sense. Algorithm 1 achieves a regret of $O(\sqrt{T})$, and Algorithm 2 achieves a regret rate that matches the standard limits for non-parametric classification ($O(T^{\frac{\beta+1}{2\beta+1}})$ for $\beta$-Hölder rewards).
- Empirical Success: Simulations show that the algorithms converge quickly. As seen in Figure 1, Algorithm 1 (known reward) identifies the optimal threshold almost immediately, while Algorithm 2 (bandit setting) progressively "clears" the suboptimal red region as it learns.
- Efficiency: The use of binary search trees allows the algorithms to scale to hundreds of thousands of tasks without significant computational overhead.
Limitations and Future Work
- Simple Contexts: The current model assumes the reward only depends on the task's duration. In reality, other factors (like the destination of a ride) matter. Extending this to high-dimensional contextual bandits is a natural next step.
- Single Resource: The model assumes one agent. Future work could explore multi-agent systems (like call centers) where several resources can be allocated simultaneously.
- Stochastic vs. Adversarial: The paper assumes tasks come from a stable, random distribution. It does not address "adversarial" settings where the types of tasks might change over time or be chosen to trick the agent.
- Spatial Constraints: For applications like ride-hailing, the agent's location changes with each task. Adding a "state variable" for location would make the model much more realistic but also significantly more complex.
Summary updated