betaFeedback

WorksComputer Science

Optimally Pacing Budget Spending and Learning

Abstract

We establish near-optimal regret bounds for budget-constrained online learning against arbitrary classes of budget-pacing experts in the adversarial setting. In particular, given any class of FF experts and a candidate budget pacing schedule, we provide a full-information algorithm which obtains regret O(Dlog⁡F+Tlog⁡F)O(D \sqrt{\log F}+ \sqrt{T\log F}) against all experts whose cumulative spending stays within distance DD of this schedule, matching lower bounds established by Braverman et al. (2025). We additionally show that our technique extends to various problems in online resource allocation, where the learner gets to see the rewards and costs of the current options available to them, and establish O(Dlog⁡F)O(D\sqrt{\log F}) regret bounds when fractional allocation is allowed. This is the first algorithm we are aware of which can achieve o(T)o(\sqrt{T}) guarantees for such tasks.

Introduction

Consider first the classical full-information online learning problem with experts. There are NN actions, FF experts and TT rounds in total. In each round, the learner gets an advice distribution over the set of NN actions from each expert, and then they choose an action to take. Each action is associated with some bounded reward, unknown to the learner prior to decision. In the adversarial model, the reward can be chosen by an adaptive adversary who might know the learner’s algorithm and the transcript of play but does not know the learner’s private randomness in the current round. The learner’s performance is measured in terms of their regret against the best expert, i.e. the difference between the cumulative rewards earned by the best expert and the cumulative reward earned by the learner. This setting is well understood and the celebrated Multiplicative Weights Update (MWU) algorithm is known to achieve an optimal regret guarantee of O(Tlog⁡F)O(\sqrt{T\log F})[9].

In many real-world applications, such as repeated auctions with budgets, drone control, and resource allocation, playing an action not only yields a reward but also incurs some cost. For example, in a repeated auction, the action may be a bid, the reward may correspond to winning an item, and the cost is the resulting payment. This motivates the study of online learning problems with resource constraints (OLRC) [Stradi et al., 2025], where each action additionally consumes a bounded resource cost, and the learner is endowed with a fixed budget of this resource and cannot overspend. Once the budget is depleted, the learner must stop and only take the null action going forward, which gives zero reward and incurs zero cost. The learner’s goal is thus to minimize regret against the best expert while maintaining budget feasibility.

In contrast to the online learning problem without resource constraints, where taking any action in the current round does not affect the learner’s ability to take any action in a future round, the online learning problem with resource constraints forces a learner to only choose the null action once their budget is depleted, which introduces a temporal coupling of the learner’s decision sets across the time horizon. Moreover, different experts may have very different spending patterns over time. The learner therefore cannot freely change its mixture over experts across rounds: even if every expert is individually budget-feasible, switching among them can cause the learner itself to violate the budget constraint. These differences with the classical setting highlight the difficulty in designing an optimal learning algorithm for the setting with resource constraints: one must simultaneously 1) learn which action is better and 2) decide what mixture of experts to follow that will guarantee both no-regret and budget feasibility.

In fact, this problem is already non-trivial even without the first difficulty. In the online resource allocation (ORA) setting [3] (Stradi et al. 2025), the current round’s reward and resource costs of each action (and thereby of following each expert) are known to the learner before they need to make a decision, so the learner doesn’t need to “guess” which action/expert gets a better reward or a better reward to cost ratio for the current round. Thus ORA removes uncertainty about the current round, but not the intertemporal allocation problem: the learner still does not know whether budget spent today should instead be saved for better opportunities in the future.

The second difficulty is therefore best summarized by the “spend-or-save” dilemma, present in both the ORA setting [2] and the OLRC setting [15]. In the OLRC setting, it shows that the classical benchmark of competing against a strategy that plays a fixed distribution until the budget is depleted is no longer possible, and any algorithm that satisfies the budget constraint must incur a worst-case regret of Ω(T)\Omega(T). Braverman et al. [ [5] characterized the learnability of the OLRC problem with experts in terms of the variability of their hindsight spending patterns: sublinear regret is attainable if and only if the experts are close to a common subpacing spending pattern in unnormalized Earth Mover’s Distance (EMD), with EMD radius o(T2)o(T^2). Their lower bound construction is, in spirit, very close to the original “spend-or-save” dilemma, where even with two experts, if their spending patterns c,c′∈[0,1]Tc,c' \in[0,1]^T differ by EMD⁡(c,c′)=Ω(T2)\operatorname{EMD}(c,c') = \Omega(T^2) (for example, one expert spends all budget B=T/2B=T/2 in the first half, and the other expert spends all budget B=T/2B=T/2 in the second half), then any algorithm must incur a worst-case regret of Ω(T)\Omega(T) on some instantiation of reward and cost sequence and expert advice distributions. However, for general EMD⁡(c,c′)\operatorname{EMD}(c,c'), their lower bound construction only gives a bound of Ω(EMD⁡(c,c′)/T)\Omega(\operatorname{EMD}(c,c')/T), which is below their algorithmic upper bound of O~(EMD⁡(c,c′)+Tlog⁡F)\widetilde{O}(\sqrt{\operatorname{EMD}(c,c')}+\sqrt{T\log F}) whenever EMD⁡(c,c′)=o(T2)\operatorname{EMD}(c,c') = o(T^2).

Thus the “spend-or-save” dilemma and prior work on learnable benchmarks highlight that the key to quantifying learnability is through controlling the variability of the experts’ spending patterns. Yet, to the best of our knowledge, existing results that propose new benchmarks do not have matching upper and lower bounds [5] (Stradi et al. 2025). This motivates us to ask the question: can we tightly characterize the regret rate in learning settings with resource constraints?

A Toy Example: Alternating Online Knapsack

The above question is already non-trivial in very simple settings. To see this, consider the following toy problem. You have an incoming stream of TT balls whose colors alternate between red and blue (so every odd numbered ball is red, and every even numbered ball is blue). The learner processes the balls one by one: in round tt, they observe the reward rt∈[0,1]r_t \in[0,1] of ball tt and have to decide what fraction of it to pick up. The learner can pick up at most T/2T/2 balls and wants low regret relative to either picking all the red balls or picking all the blue balls. How small can this regret be?

Note that this maps cleanly onto the online resource allocation (ORA) problem defined above: each ball has unit cost, and each color of ball (red and blue) corresponds to a different expert. The red expert has spending pattern (1,0,1,0,…)(1,0,1,0,\ldots), the blue expert has spending pattern (0,1,0,1,…)(0,1,0,1,\ldots), and they are both within EMD distance O(T)O(T) of the uniform pacing pattern (1/2,1/2,…)(1/2,1/2,\ldots). The existing results of Braverman et al. [ [5] yield an O(EMD⁡)=O(T)O(\sqrt{\operatorname{EMD}})=O(\sqrt{T}) regret algorithm against these experts, and indeed a simple variant of MWU (treating each pair of balls as a single round with a red arm and a blue arm) achieves this regret bound, even when the reward is not observable until the end of the round. On the other hand, the best lower bound construction only gives a lower bound of Ω(EMD/T)=Ω(1)\Omega(\mathrm{EMD}/T) = \Omega(1).

We show that in this case the lower bound is tight: there exists an algorithm that achieves constant regret for this problem. The key idea is somewhat different from the usual Lagrangian treatment of a budget constraint. A standard approach would attach a dual price to deviation from the fixed pacing budget and optimize reward minus priced resource consumption. But regret is measured relative to one of the two experts, not relative to this fixed pacing baseline. Our algorithm instead measures both reward regret and spending discrepancy relative to the same mixture of the red and blue experts. It then chooses the current action by solving a small minimax problem over this comparator mixture and a resource-price variable. This lets a single potential control both quantities and, in this example, yields constant regret.

More generally, we can get similar results for the problem where there are alternating blocks of DD red balls and DD blue balls, for a total of TT rounds. Here the EMD-based regret bounds give a regret of O(D⋅T/(2D))=O(DT)O\left(D \cdot\sqrt{T/(2D)}\right) = O(\sqrt{DT}). But the above technique establishes a regret bound of O(D+T)O(D + \sqrt{T}) in the OLRC setting, and a regret bound of only O(D)O(D) in the ORA setting. Note that for all D=o(T)D = o(T), this is asymptotically better than the best previously known algorithm for both the OLRC and ORA settings.

Our Results

More generally, we answer the question of how to characterize instance-optimal regret rates in a general class of ORA and OLRC problems. In particular, we show that instead of earth mover’s distance, the more relevant quantity is the largest difference in experts’ cumulative spending over any prefix of the time horizon. Formally, consider the following distance between two spending patterns c,c′∈[0,1]Tc, c' \in[0,1]^T:

Kol⁡(c,c′):=max⁡t∈[T]∣∑s=1t(cs−cs′)∣.\operatorname{Kol}(c,c') := \max_{t \in[T]} \left|\sum_{s=1}^{t}(c_s-c'_s)\right|.

We call this quantity the Kolmogorov distance. This captures directly the feature exploited by the lower-bound construction in the spend or save dilemma: if two spending patterns are far apart in earth mover’s distance, then their cumulative spending must differ substantially at some point in time, and it is this cumulative-spending gap that drives the resulting spend-or-save lower bound construction. In particular, we will show that across multiple different settings the Kolmogorov distance between spending patterns of experts characterizes the optimal regret achievable. For example, in the toy example above, the Kolmogorov distance between the red spending pattern and the blue spending pattern is 11, explaining the constant regret algorithm.

We therefore fix a baseline spending pattern bb and a radius DD, and compete against experts whose spending patterns remain within Kolmogorov distance DD of bb1. We call such experts DD-pacing. In our main theorem, we show that we can establish a regret bound of either O(Dlog⁡F)O(D\sqrt{\log F}) (in the ORA setting) or O((T+D)log⁡F)O((\sqrt{T}+D)\sqrt{\log F}) (in the OLRC setting) against the performance of the best of these pacing experts, when allocation is allowed to be fractional:

Theorem 1.1 (Theorem 4.6 (simplified)). Fix a time horizon TT, a baseline spending pattern bb, and a radius DD. Assume there exists a constant α>0\alpha> 0 such that, for all times tt and actions aa, we have a bounded reward-to-cost ratio2

rt(a)≤αct(a).r_t(a) \le\alpha c_t(a).

Suppose there are FF experts, each of which is DD-paced with respect to the same baseline spending pattern bb.

Then there exist (fractional play)3 online algorithms with the following guarantees:

  • ORA: Reg⁡T=O(Dlog⁡F)\operatorname{Reg}_{T}=O\left(D\sqrt{\log F}\right).

  • OLRC: Reg⁡T=O((T+D)log⁡F)\operatorname{Reg}_{T}=O\left((\sqrt{T}+D)\sqrt{\log F}\right).

These guarantees are optimal up to constant factors. In § 6, we show an Ω(Dlog⁡F)\Omega(D\sqrt{\log F}) lower bound even in the ORA setting. Together with the classical Ω(Tlog⁡F)\Omega(\sqrt{T\log F}) experts lower bound, this also yields an Ω(max⁡{D,T}log⁡F)\Omega(\max\{D,\sqrt{T}\}\sqrt{\log F}) lower bound in the OLRC setting, matching our upper bound up to constant factors.

The algorithms of Theorem 1.1 are flexible and can be extended in many ways: to algorithms with sampled play, to sets of experts which are subpacing4, and to settings with multiple resources. We provide a full summary of guarantees in the single-resource setting in Section A; the corresponding multiple-resource guarantees are given in Theorem 4.6 and § 5.

Related Work

Online Resource Allocation (ORA) & Online Learning with Resource Constraints (OLRC)

In the ORA setting, the typical benchmark is the best-in-hindsight dynamic strategy that satisfies the global budget constraint [3], and in the OLRC setting, the typical benchmark is the set of strategies that play the same distribution every round until they run out of budget [15]. In the OLRC setting, when the learner only gets bandit feedback, this is often referred to as the Bandits with Knapsacks problem, initiated by Badanidiyuru et al. [ [1] for the stochastic environment and Immorlica et al. [ [15] for the adversarial environment. When the rewards and costs are adversarially chosen (the main focus of our paper) there is a Ω(T)\Omega(T) lower bound in both the ORA and OLRC settings [2, 15]. Thus prior work mostly focuses on achieving competitive ratio guarantees for these settings [15, 6, 8, 3]. Exceptions to these are works that focus on alternative benchmarks [5] (Stradi et al. 2025) and works that derive a regret guarantee as a function of some nonstationarity measure of the environment [18, 11] (Slivkins et al. 2023). Jenatton et al. [ [16] study dynamic regret guarantees for more general non-additive objective functions in the 1-lookahead setting (which is similar to our ORA setting), where the objective can encode a penalty term for long-term constraint violations. Our benchmarks are incomparable: their benchmark is the optimal dynamic sequence for a soft penalized objective, whereas we compete against a set of DD-pacing experts under a hard budget constraint.

A recurring theme in both the ORA setting and the OLRC setting is the use of the online primal-dual framework or Lagrangian-based algorithm for developing algorithms [3, 15, 5] (Stradi et al. 2025). The budget constraint is Lagrangified by a dual multiplier, and the primal player makes decisions based on this Lagrangified objective, while the dual player updates the dual multiplier separately, which serves as a penalty for deviations from a uniform per-round budget [3] or a spending plan [Stradi et al., 2025]. Our algorithm, interestingly, does not follow the same primal-dual template. Instead of using an alternating primal step and dual step, our algorithm optimizes the primal variable and dual variable jointly according to some potential function, which is what allows us to get a TT-independent bound in the ORA setting and a decoupled O(D+T)O(D+\sqrt{T}) bound in the OLRC setting against DD-pacing experts.

Online Convex Optimization with Constraints There is a vast literature on online convex optimization problems with long-term constraints [Mannor et al., 2009, Mahdavi et al., 2012]. At round tt, the learner makes a decision xt∈Xx_t \in\mathcal{X} and gets the full-information feedback of a convex cost function ftf_t and a constraint function gt≤0g_t \le0. Different from the OLRC setting, which requires hard budget feasibility, this setting allows the algorithm to have constraint violations, and the goal is to minimize regret against some strategy x∗x^* (with certain feasibility assumptions) and the cumulative constraint violation separately. Mannor et al. [2009] provides an impossibility result for obtaining a vanishing bound in both objectives when x∗x^* is only required to satisfy ∑tgt(x∗)≤0\sum_t g_t(x^*) \le0. Follow-up work often restricts the benchmark strategy to satisfy gt(x∗)≤0, ∀t∈[T]g_t(x^*) \le0, \ \forall t \in[T] [10] (Neely and Yu 2017; Sun et al. 2017; Sinha and Vaze 2024), which is analogous to a strict requirement for the benchmark strategies to follow a given spending plan in our setting. A slightly more general benchmark is considered by Liakopoulos et al. [ [17], where the benchmark strategy only needs to be feasible for KK-sized windows. The objectives of this line of work differ from ours, as it does not hard-stop the algorithm when there is a constraint violation, so the results are incomparable.

Bidding in Repeated Auctions Repeated auctions with budget constraints form a canonical single-resource instance of OLRC. Extensive literature employs pacing multipliers to dynamically shade bids and regulate expenditure [4, 2, 13]. While the standard benchmark is the best-in-hindsight multiplier, vanishing regret against this baseline is unattainable in the adversarial setting due to the spend-or-save dilemma [13]. Consequently, recent works [13, 19] consider more relaxed benchmarks—the best sequence of perfect pacing multipliers, where each perfect pacing multiplier makes sure the budget (or ROI) constraint is tight in expectation in that round and achieve no-regret guarantees as a function of the path length of the perfect pacing multipliers. Our benchmark extends beyond strategies that need to satisfy per-round budget and scales smoothly with the variability of spending patterns in the benchmark class.

Comparisons with Prior Work

References

  1. [1]Ashwinkumar Badanidiyuru, Robert Kleinberg, and Aleksandrs Slivkins. Bandits with knapsacks. In Proceedings of the 2013 IEEE 54th Annual Symposium on Foundations of Computer Science, FOCS ’13, page 207–216, USA, 2013. IEEE Computer Society. ISBN 9780769551357. doi: 10.1109/FOCS.2013.30. URL https://doi.org/10.1109/FOCS.2013.30.
  2. [2]Santiago R. Balseiro and Yonatan Gur. Learning in repeated auctions with budgets: Regret minimization and equilibrium. Manage. Sci., 65(9):3952–3968, September 2019. ISSN 0025-1909. doi: 10.1287/mnsc.2018.3174. URL https://doi.org/10.1287/mnsc.2018.3174.
  3. [3]Santiago R. Balseiro, Haihao Lu, and Vahab Mirrokni. The best of many worlds: Dual mirror descent for online allocation problems. Operations Research, 71(1):101–119, 2023. doi: 10.1287/opre.2021.2242. URL https://doi.org/10.1287/opre.2021.2242.
  4. [4]Christian Borgs, Jennifer Chayes, Nicole Immorlica, Kamal Jain, Omid Etesami, and Mohammad Mahdian. Dynamics of bid optimization in online advertisement auctions. In Proceedings of the 16th International Conference on World Wide Web, WWW ’07, page 531–540, New York, NY, USA, 2007. Association for Computing Machinery. ISBN 9781595936547. doi: 10.1145/1242572.1242644. URL https://doi.org/10.1145/1242572.1242644.
  5. [5]Mark Braverman, Jingyi Liu, Jieming Mao, Jon Schneider, and Eric Xue. A new benchmark for online learning with budget-balancing constraints, 2025. URL https://arxiv.org/abs/2503.14796.
  6. [6]Matteo Castiglioni, Andrea Celli, and Christian Kroer. Online learning with knapsacks: the best of both worlds. In International Conference on Machine Learning, pages 2767–2783. PMLR, 2022a.
  7. [8]Matteo Castiglioni, Andrea Celli, and Christian Kroer. Online learning under budget and roi constraints via weak adaptivity. In Forty-first International Conference on Machine Learning, 2024.
  8. [9]Nicolo Cesa-Bianchi and Gabor Lugosi. Prediction, Learning, and Games. Cambridge University Press, 2006.
  9. [10]Tianyi Chen and Georgios B Giannakis. Bandit convex optimization for scalable and dynamic iot management. IEEE Internet of Things Journal, 6(1):1276–1286, 2018.DOI
  10. [11]Giannis Fikioris and Éva Tardos. Approximately stationary bandits with knapsacks. In Gergely Neu and Lorenzo Rosasco, editors, Proceedings of Thirty Sixth Conference on Learning Theory, volume 195 of Proceedings of Machine Learning Research, pages 3758–3782. PMLR, 12–15 Jul 2023. URL https://proceedings.mlr.press/v195/fikioris23a.html.arxiv.org/abs/2302.14686
  11. [12]David A Freedman. On tail probabilities for martingales. the Annals of Probability, pages 100–118, 1975.DOI
  12. [13]Jason Gaitonde, Yingkai Li, Bar Light, Brendan Lucier, and Aleksandrs Slivkins. Budget Pacing in Repeated Auctions: Regret and Efficiency Without Convergence. In Yael Tauman Kalai, editor, 14th Innovations in Theoretical Computer Science Conference (ITCS 2023), volume 251 of Leibniz International Proceedings in Informatics (LIPIcs), pages 52:1–52:1, Dagstuhl, Germany, 2023. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. ISBN 978-3-95977-263-1. doi: 10.4230/LIPIcs.ITCS.2023.52. URL https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ITCS.2023.52.DOI
  13. [14]Alison L. Gibbs and Francis Edward Su. On choosing and bounding probability metrics. International Statistical Review / Revue Internationale de Statistique, 70(3):419–435, 2002. ISSN 03067734, 17515823. URL http://www.jstor.org/stable/1403865.
  14. [15]Nicole Immorlica, Karthik Sankararaman, Robert Schapire, and Aleksandrs Slivkins. Adversarial bandits with knapsacks. J. ACM, 69(6), November 2022. ISSN 0004-5411. doi: 10.1145/3557045. URL https://doi.org/10.1145/3557045.
  15. [16]Rodolphe Jenatton, Jim Huang, Dominik Csiba, and Cedric Archambeau. Online optimization and regret guarantees for non-additive long-term constraints, 2016. URL https://arxiv.org/abs/1602.05394.
  16. [17]Nikolaos Liakopoulos, Apostolos Destounis, Georgios Paschos, Thrasyvoulos Spyropoulos, and Panayotis Mertikopoulos. Cautious regret minimization: Online optimization with long-term budget constraints. In International Conference on Machine Learning, pages 3944–3952. PMLR, 2019.
  17. [18]Shang Liu, Jiashuo Jiang, and Xiaocheng Li. Non-stationary bandits with knapsacks. Advances in Neural Information Processing Systems, 35:16522–16532, 2022.arxiv.org/abs/2205.12427
  18. [19]Brendan Lucier, Sarath Pattathil, Aleksandrs Slivkins, and Mengxiao Zhang. Autobidders with budget and roi constraints: Efficiency, regret, and pacing dynamics. In Shipra Agrawal and Aaron Roth, editors, Proceedings of Thirty Seventh Conference on Learning Theory, volume 247 of Proceedings of Machine Learning Research, pages 3642–3643. PMLR, 30 Jun–03 Jul 2024. URL https://proceedings.mlr.press/v247/lucier24a.html.arxiv.org/abs/2301.13306

Paper details

vlnc:W_k2az24ux
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents