Manuscript Offprint
arXiv:2610.07491Who Bears the Burden? Learning Responsibility for Shared Constraints in Multi-Agent Reinforcement Learning
ABSTRACT
When multiple agents share a cost budget, a common Lagrange multiplier can enforce the aggregate constraint but does not determine how its penalty should be allocated across agents. Uniform penalties ignore heterogeneity in the rewards agents sacrifice, while agent-specific multipliers may still rely on the same aggregate cost signal. We introduce Lagrangian Responsibility Allocation (LiRA), which learns each agent's share of a common multiplier by optimizing social welfare over a finite training horizon. The multiplier enforces the aggregate budget, while responsibility shares redistribute its influence without modifying the original rewards or constraints. For convex games under standard regularity conditions, varying these shares induces a smooth family of normalized generalized Nash equilibria in which active constraints remain at their budgets while welfare varies. To optimize responsibility before convergence, we derive a welfare gradient that accounts for both learning updates and the induced change in data distribution. Across CityLearn, MABIM, Harvest, and MetaDrive, spanning 3 to 400 agents, LiRA improves average social welfare by up to 29% over uniform and agent-specific multiplier baselines. Grid and driving costs remain within budget, inventory violations decrease, and Harvest makes more effective use of available budget.
1 INTRODUCTION
Consider two delivery robots approaching a narrow corridor. One carries an urgent package, while the other is traveling to collect a package. Either robot may yield to avoid a collision, but delaying the loaded robot incurs a larger loss. A shared collision-avoidance constraint excludes unsafe outcomes, but does not determine how the burden of satisfying the constraint should be allocated between the robots. This ambiguity arises more broadly in multi-agent systems subject to shared constraints, including power limits, resource budgets, and safety requirements, when agents incur heterogeneous costs for adapting their behavior.
A shared Lagrange multiplier specifies the strength of the penalty associated with a common constraint, but does not determine how that penalty should be apportioned across agents. Applying the same penalty to all agents leaves this allocation implicit. Introducing agent-specific multipliers does not resolve the issue when each multiplier is driven by the same aggregate constraint cost. We instead make the allocation of constraint responsibility explicit. Specifically, a responsibility share determines the fraction of the shared penalty applied to each agent's objective, while the common multiplier continues to enforce the aggregate constraint. The original rewards and constraint budget remain unchanged. Responsibility allocation therefore modifies which agents are incentivized to adapt without altering the underlying constrained problem.
Corresponding author.
(a) Who should yield?

(b) Same safety, different welfare · Theorem 1

Same active safety
adapts with .
(c) LiRA: learn responsibility · Theorem 2
Shared safety penalty
1 Look ahead · independent runs

Fresh evaluation
2 Differentiate
DU · Direct unroll
SC · Sampling correction
Update ; resume actual learning from .
Figure 1: Overview of LiRA. (a) In the illustrated corridor scenario, uniform shares leave both robots waiting; learned shares let the robot without an urgent package yield so that the loaded robot proceeds. Both outcomes avoid collision but differ in welfare. (b) Under Theorem 1's conditions, varying responsibility selects a smooth equilibrium family. For each active constraint , cost stays at its budget , while welfare can vary and the shared equilibrium multiplier adapts to . (c) From checkpoint , LiRA runs independent lookahead of learner updates, each followed by fresh evaluation. It combines direct unrolling (DU) with sampling correction (SC) to estimate , update , and restart from .
This additional degree of freedom induces a nontrivial equilibrium-selection problem. Under convexity, monotonicity, and standard regularity conditions, varying the responsibility shares generates a smooth family of normalized generalized Nash equilibria. Along this family, each active constraint remains satisfied at its budget, while social welfare may vary (Theorem 1). Motivated by this observation, we introduce Lagrangian Responsibility Allocation (LiRA), which optimizes responsibility shares to select among feasible equilibria according to social welfare.
LiRA does not require the underlying agents to converge to equilibrium before responsibility allocation can be optimized. Instead, it evaluates a candidate allocation through the welfare obtained after a finite lookahead of the learning dynamics. Changing the responsibility shares influences both the policy updates within this lookahead and the distribution of data collected for subsequent updates. We derive a gradient estimator that accounts for both effects by differentiating through the learning dynamics and correcting for the induced change in the sampling distribution (Theorem 2). Independent lookaheads initialized from a common training checkpoint allow this gradient to be estimated without modifying the primary learning trajectory. Figure 1 summarizes the resulting framework, from responsibility allocation in the motivating corridor example to its implementation within the learning procedure.
We test LiRA on four multi-agent tasks, including building energy management in CityLearn (Nw-eye et al., 2025) with 3 agents, inventory control in MABIM (Yang et al., 2023) with 400 agents, resource harvesting in Harvest (Melting Pot commons_harvest_open (Agapiou et al., 2022)) with 7 agents, and autonomous driving in MetaDrive (Li et al., 2023) with 4 agents. LiRA has the highest mean welfare in all four tasks (Section 4.1). It keeps grid costs within budget in CityLearn, reduces safety violations in MetaDrive, and cuts order-rejection penalties in MABIM. A matched CityLearn episode (Section 4.2) traces the gain to individual buildings: the two that overcool receive a larger share of the grid-electricity penalty, cool less, and recover comfort while district electricity falls.
Equilibria under shared constraints. When agents share constraints, the feasible set of each depends on the others' choices. Generalized Nash equilibria formalize such interdependence (Facchinei & Kanzow, 2010). Rosen's normalized equilibria fix the ratios between agents' constraint multipliers (Rosen, 1965) and parameterized variational inequalities trace the resulting family (Nabetani et al., 2011; Dreves, 2018). In dynamic games with shared constraints, non-normalized equilibria can also be computed and a preferred one selected by a design criterion (Pustilnik & Borrelli, 2025). Recent safe-learning work studies convergence to such equilibria under state-wise constraints (Li & Azizan, 2024). Our responsibility shares set the multiplier ratios directly. Welfare then selects among the equilibria they index.
Learning through the agents’ response. Varying allocations can improve welfare at equilibrium, but agents are still learning when shares must be chosen. Incentive design modifies rewards in anticipation of agents’ adaptive response (Yang et al., 2020a; 2022; Zheng et al., 2022). Bilevel formulations and differentiable equilibrium blocks offer complementary approaches (Thoma et al., 2024; Shen et al., 2024; Thoma et al., 2026). LiRA differs in that it allocates the penalty of an existing constraint rather than designing new rewards. Its gradient combines meta-gradient differentiation through learner updates (Xu et al., 2018; Franceschi et al., 2017; Grefenstette et al., 2019) with a sampling correction for the data collected by intermediate policies (Vuorio et al., 2022). Iterative and implicit hypergradients connect finite-window responses to equilibrium sensitivity (Grazzi et al., 2020).
3 METHOD
The Lagrangian penalty for a shared constraint has a scale, set by the multiplier, and a distribution across agents, usually left at 1/N. LiRA adds a learnable responsibility vector that controls the distribution as the multiplier continues to track aggregate cost. We formalize this allocation, show that it selects among equilibria with different welfare at the same active costs, and derive a gradient for choosing shares from a finite training window.
3.1 RESPONSIBILITY ALLOCATION
Consider a Markov game with agents and shared constraints. Agent uses policy , where is the action and is the local observation. The joint policy factorizes across agents and induces trajectory distribution , where . On a trajectory of length , let denote agent 's reward and the shared cost for constraint at step . With discount factor and budget , define
We measure social welfare using the original rewards, , with fixed positive weights .
LiRA introduces a responsibility allocation. Let be agent 's share of the penalty for constraint , with and . At learner update , the shared multiplier sets the overall penalty scale. Agent receives coefficient and trains on
Equal shares, , recover the usual Lagrangian coefficient . A larger makes constraint matter more to agent 's update. It does not alter the reward, cost, or budget used to evaluate the resulting policies. We optimize unconstrained logits and map them to these nonnegative shares with a softmax. A small positive floor can keep every agent exposed to the shared penalty. Appendix C.3 gives the exact map.
The multiplier retains the standard Lagrangian primal–dual update from constrained reinforcement learning (Altman, 1999; Tessler et al., 2019; Stooke et al., 2020). At a scheduled dual update, let be the estimated cost on the same scale as its budget , let be the dual step size, and let . The shared multiplier follows
Each multiplier sees aggregate cost, regardless of who receives its penalty. The factor N in ensures that equal shares recover the original coefficient, so varying redistributes pressure rather than rescaling it uniformly. We next show that this redistribution can change welfare even when an active constraint stays at its budget.
3.2 WELFARE VARIES ALONG THE COST SURFACE
In Figure 1(a), either robot can yield. A feasible outcome need not be the best one for their combined rewards. The constraint says what is forbidden, not who should give way. Generalized Nash equilibria formalize such constrained best responses (Facchinei & Kanzow, 2010). Among them, a normalized equilibrium fixes the ratios of agents' constraint multipliers (Rosen, 1965). The responsibility shares set exactly those ratios, so changing selects a different equilibrium under the same shared constraint.
To make this precise, consider a positive responsibility vector , with for every constraint . Let be an interior region of the simplex, the selected normalized equilibrium, and its shared multipliers. Let denote the active shared constraints. The regularity assumptions are collected in Appendix A.1.
Theorem 1 (Equilibrium selection at fixed active costs). Under assumptions (A1)–(A3) in Appendix A.1, each selects a unique normalized equilibrium, and and are in . Every active shared cost remains at its prescribed budget:
If welfare has a nonzero derivative along the simplex at , then nearby responsibility allocations attain different welfare at those same active costs.
The proof is in Appendix A.2.
The mechanism is visible in the agents' first-order conditions. A larger share raises the constraint's marginal price for one agent relative to another. When their marginal rewards for yielding differ, the joint policy shifts along the active cost surface. Total cost stays at the budget because the shared multiplier compensates, but the agents divide the adjustment differently (Figure 1(b)). The theorem makes this precise through the nonzero welfare derivative. It does not guarantee that every direction improves welfare, only that some direction does whenever the derivative is nonzero.
Appendix A.3 extends the result locally to separate shares for each constraint. During training, however, the agents have not settled at an equilibrium, and we need to choose an allocation from the response they actually produce.
3.3 CHOOSING SHARES DURING TRAINING
Theorem 1 identifies the opportunity at equilibrium. To realize it during training, LiRA evaluates a proposed allocation by the welfare it produces after a finite number of updates, making the training process itself the object we differentiate.
Let collect everything needed to resume training at update , including the policies, critics, optimizer state, and shared multipliers. Let be the batch collected at that update, and let denote one differentiable lookahead step. Then
The lookahead map may update the actors, critics, optimizer state, and shared multipliers according to the chosen probe. It need only be differentiable along a sampled training window. Our experiments use proximal policy optimization (PPO) (Schulman et al., 2017).
Starting from checkpoint , let q be the lookahead horizon. Holding the allocation fixed for these q updates gives the finite-training objective
The objective measures welfare after the next q updates under the proposed shares, using the agents' original rewards.
Changing a share changes the update computed from a fixed training batch. The updated policy then collects a different batch for the next update. To account for this second path, define the training-batch score
where the total derivative follows the recorded learner updates for a fixed realized training history.
The distinction first appears after an update has changed the policy. With fixed, the initial batch is collected before the proposed allocation has changed any policy. A second batch can reflect the allocation through the first update. A two-update lookahead is therefore the shortest window that exposes both the direct update and the changed-data path. Longer windows follow more of the ensuing response but also require more sampled updates.
Theorem 2 (Finite-training responsibility gradient). Suppose is fixed and the learner and sampling laws satisfy the regularity conditions in Appendix B. Then
The proof is in Appendix B.
The direct-unrolling (DU) term differentiates the recorded updates at fixed data. Its complement, the sampling-correction (SC) term, accounts for the data collected by intermediate policies (Yang et al., 2020a; 2022; Vuorio et al., 2022). Policy scores let us estimate the two terms without a simulator derivative. Appendix B gives the derivation.
3.4 ESTIMATING THE LIRA UPDATE
The gradient in Eq. (8) can be estimated without committing any proposed update to the live learner. From its current checkpoint, LiRA runs independent continuations, each for updates at the same allocation. For continuation , let be its welfare on fresh terminal rollouts, the direct-response estimate, and the score of its training history.
A lookahead of q updates sets the response used to choose responsibility. After that, u live updates advance the learner before the next choice. Update schedules for the two phases can differ. Appendix D.1 specifies the CityLearn probe and live schedules.
For its sampling term, continuation m uses the other continuations' mean welfare as a baseline,
This gives
Because is independent of the score from continuation m, centering preserves the expected gradient (Appendix B.5). For an exact differentiable lookahead, Eq. (10) is unbiased. In CityLearn we use the stopped-batch approximation described in Appendix C.2, while holding the shared multiplier fixed over the short probe to isolate responsibility redistribution at the current dual scale.
Terminal welfare is estimated from the original rewards on fresh rollouts. Its direct gradient follows the final policy’s score back through the recorded learner updates. The history score accumulates the policy scores of batches collected during the lookahead. Reusing a training batch for multiple PPO epochs does not create new sampled actions in that history. These distinctions keep the two terms in Eq. (10) tied to the same finite response.
Algorithm 1 LiRA: learning responsibility from finite continuations
Require: Checkpoint , allocation logits , outer cycles , lookahead , independent continuations , live updates per cycle , step size .
1: for do
2: for do
3: Restore and set .
4: for do
5: Collect a fresh batch with the policy in .
6: , the batch score in Eq. (7).
7: .
8: end for
9: On fresh terminal rollouts, estimate and .
10: end for
11: Compute for each and by Eq. (10).
12: Ascend along with step size to obtain .
13: Restore ; train the live learner for fresh updates under , obtaining .
14: end for
15: return the final policy in and .
The continuations are discarded after the allocation step. Only the fresh live updates produce the next checkpoint, including its optimizer and dual state. One outer cycle thus takes lookahead learner updates and live updates, plus terminal rollouts. Appendix C specifies the lookahead implementation.
4 EXPERIMENTS
The theory above assumes convex games with smooth payoffs. We now test whether LiRA produces welfare gains when agents train with nonlinear function approximators for a finite time. Four tasks test welfare and cost across different scales and constraint types. CityLearn then lets us inspect individual agents. Throughout, we read costs alongside rewards to distinguish gains obtained by spending unused budget from gains at nearly the same shared cost.
4.1 WELFARE AND SHARED COSTS ACROSS TASKS
The shared constraint plays a different role in each of our four tasks. In CityLearn v2 (Nweye et al., 2025), three buildings control their energy devices for thermal comfort. They draw electricity from the same district, so their combined net demand faces one grid cap: reducing demand in one building can relieve a cost borne by all three. In MABIM (Yang et al., 2023), 400 product agents manage replenishment across an inventory network to maximize total profit, subject to shared order-rejection caps across two warehouse-store links. An allocation now distributes pressure across hundreds of decisions and two distinct constraints. Harvest, the Melting Pot (Agapiou et al., 2022) substrate commons_harvest_open (built on Lab2D (Beattie et al., 2020)), has seven agents collecting a common resource under one shared cost. MetaDrive (Li et al., 2023) has four driving agents and a shared limit on the rate of safety events. These tasks differ in scale and in what an agent gives up to reduce cost. In all four benchmarks, we set for every agent, so welfare is the sum of agents' original returns.
We compare LiRA with two baselines. Uniform responsibility sets , and each agent receives an equal share of each shared multiplier. The per-agent Lagrangian baseline (PAL) instead learns a separate multiplier for each agent. LiRA keeps a shared multiplier and learns its responsibility shares. Within each task, methods use the same inner learner and matched training seeds under a common evaluation protocol. Table 1 gives held-out means and sample standard deviations over three training seeds, or six for MetaDrive. Rewards and costs retain their native units: welfare is compared within each task, and each cost against its own budget. MABIM's rejection budgets are calibrated on validation data, with eight matched action seeds in testing. MetaDrive starts each method from the same actor checkpoint and uses 13 held-out episode seeds. Appendix D.1 gives further details of the protocol.
Table 1: Welfare and shared costs across four tasks. Held-out mean sample standard deviation over matched training seeds (three per task; six for MetaDrive). Costs and budgets use the units shown in each row. Bold marks the highest mean welfare.
| Task (N, K) | Outcome | Budget | Uniform | PAL | LiRA |
|---|---|---|---|---|---|
| CityLearn (3, 1) | Welfare () | - | |||
| Grid excess (kWh) | 28.76 | ||||
| MABIM (400, 2) | Welfare () | - | |||
| Rejections | 20.35 | ||||
| Rejections | 32.69 | ||||
| Harvest (7, 1) | Welfare | - | |||
| Shared cost | 68.00 | ||||
| MetaDrive (4, 1) | Welfare | - | |||
| Events / steps | 1.00 |
LiRA's mean welfare is highest in every domain (Table 1), but the cost response differs in each.
CityLearn. Uniform and PAL both return in mean comfort reward. PAL starts with equal multipliers and receives identical district-cost feedback, so its multipliers stay equal. LiRA raises the welfare to , and the mean grid exceedance moves from 28.44 to , against a budget of . The gain comes at nearly the same district cost. Section 4.2 asks what the buildings do differently to obtain it.
MABIM. With 400 agents and two constraints, LiRA reaches million versus Uniform's million. It also reduces the more strained rejection cost from 21.51 to 21.30 million. Both still exceed the budget of 20.35 million, so the welfare gain accompanies a cost improvement rather than a cost trade.
Harvest. The shared cost is well within budget: 33–37 versus 68. The welfare rises from 42.73 (Uniform) to 50.27 using the unused allowance.
MetaDrive. LiRA reaches 64.26 in welfare (Uniform: 49.72; PAL: 60.94) and records 0.890 safety events per thousand steps, below both the 1.00 limit and Uniform's 1.017. PAL improves welfare, but at 1.337 events. In MetaDrive, learning shares of a common penalty outperforms individually learned penalties in both mean welfare and safety.

Hour of day
Figure 2: Hourly temperature relative to setpoint in CityLearn. Each point averages observations at that hour in the matched 719-step seed-1102 evaluation. Uniform is dashed; LiRA is solid. Gray marks the comfort band, and tan the 16–18h price peak. The episode totals appear in Table 2.
Table 2: CityLearn responsibility and episode outcomes. Seed-1102 evaluation over 719 steps. Uniform assigns to each building; changes are LiRA minus Uniform. Reward is native building comfort reward.
| Learned ρ | Electricity change (kWh) | Reward change (103) | |
|---|---|---|---|
| Building 1 | 0.395 | -37.6 | +4.43 |
| Building 2 | 0.387 | -32.7 | +0.48 |
| Building 3 | 0.218 | -18.9 | -0.03 |
4.2 WHAT THE BUILDINGS DO DIFFERENTLY
Each CityLearn building earns a thermal-comfort reward. The shared cost accumulates the positive excess of district net electricity over a per-step grid cap across 719 steps, with a budget of 28.76 kWh. For an overcooled building, easing cooling serves both objectives at once. It saves electricity and improves comfort. For a building that is already too warm, the comfort effect reverses.
Figure 2 follows a matched 719-step evaluation under Uniform and LiRA. It folds the temperatures into hour-of-day means, while Table 2 reports the allocations and totals from those same episodes. The shaded 16–18h price peak gives context for the daily response. The shared grid-cap cost is accumulated over the whole evaluation.
Under Uniform, Building 1 is below the comfort band for 314 steps and Building 2 for 232. Building 3 is above it for 318. The first two buildings are overcooled, while the third tends to run warm.
LiRA moves Building 1's daytime temperatures toward the comfort band. Building 2, coldest late in the day, also warms: at 18h, within the marked peak, its mean is below the setpoint instead of . Building 3 begins above the band, so reducing its cooling would not improve comfort. The same district cost signal reaches buildings with different thermal needs.
The mean cooling action drops from 0.197 to 0.184 in Building 1 and from 0.312 to 0.287 in Building 2. Building 3 also cools less (0.180 to 0.169), but starts from a warmer state.
The learned shares put more responsibility on the overcooled buildings: for Building 1 and 0.387 for Building 2, against 0.218 for Building 3 and each under Uniform.
Episode electricity use drops by 37.6 and 32.7 kWh for Buildings 1 and 2, and their cold steps drop to 269 and 164. However, the comfort gains differ: 4.43k versus 0.48k. Building 1 also has much higher baseline cold discomfort (586.1 versus 214.5 °C-steps), so the reduction in cold discomfort more than offsets the small increase in warm discomfort. Building 3 uses 18.9 kWh less, with almost no change in comfort reward (-0.03k).
In this seed-1102 episode, these building-level changes increase welfare by 4.88k as district cap exceedance falls from 25.42 to 23.78 kWh. (The three electricity reductions sum to 89.2 kWh. The smaller change in cap exceedance reflects that shared cost counts only electricity above the cap at each step.) The welfare improvement in this matched episode arises because buildings for which reduced cooling improves comfort and also relieves the grid receive more responsibility and adjust their behavior accordingly. Appendix D.2 provides the reward breakdown.
4.3 SENSITIVITY OF THE OUTER LOOP
The shares are learned from a finite training response, so their quality depends on the outer-loop design: how far ahead to look , how many independent lookahead to average , and how fast the shares move . We vary each one at a time around the CityLearn setting used in Table 1, keeping the other two fixed, with three matched seeds and live PPO updates per cycle.
Table 3: CityLearn local search around the main setting. Each row changes one parameter from . Welfare and grid excess are mean sample standard deviation over three matched seeds. The grid-excess budget is 28.76 kWh.
| Varied choice | Setting | Welfare () | Grid excess (kWh) |
|---|---|---|---|
| Main setting | (2, 8, 0.05) | ||
| Lookahead | |||
| Replicates | |||
| Step size | |||
The center gives the highest mean welfare among these local choices , with of grid excess against a budget. Looking three or four steps ahead instead of two yields or , without reducing grid excess. Four or twelve independent lookahead also give lower mean welfare than eight, at similar mean costs.
The responsibility step matters most in this sweep. Leaving it at 0.025 gives and ; doubling it to 0.10 gives and . Neither neighbor improves the center's welfare-cost outcome. This setting produces the district-level gain in Table 1 and the building responses in Section 4.2.
5 CONCLUSION
A shared cost limit constrains what agents may do collectively but leaves open who adjusts. LiRA makes this division learnable. At equilibrium, responsibility shares can change welfare even as active costs stay in their budgets. The finite-training gradient extends this to nonconvergent learners by estimating welfare's response to a proposed allocation through independent lookahead. Across four tasks, the learned shares give the highest mean welfare among the compared methods. In CityLearn, the welfare gain traces to individual buildings: the two that overcool receive a larger penalty share, cool less, and recover comfort while district electricity falls.
6 LIMITATIONS
Theorem 1 requires own-concave payoffs, convex shared costs, and a strongly monotone weighted payoff field with a fixed active-constraint set. Deep policy networks violate these conditions, and our finite-training gradient (Theorem 2) does not guarantee welfare improvement in such settings by itself. Closing this gap, for instance, by establishing local improvement guarantees for nonconvex learners under shared constraints, is a substantial open problem. The responsibility shares are also constant across states; every state sees the same allocation. A state-dependent could, for example, shift responsibility during peak-demand hours, but it turns the outer problem from optimizing a point on the simplex into learning a function, and the welfare gradient would need to track how the allocation itself reshapes the state distribution.
CODE AVAILABILITY AND REPRODUCIBILITY
Our code, per-seed result files, and scripts that regenerate the reported tables are linked from the project page, https://lira-marl.github.io/. Benchmark settings, training seeds, and evaluation protocols are given in Appendix D.
REFERENCES
Joshua Achiam, David Held, Aviv Tamar, and Pieter Abbeel. Constrained policy optimization. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pp. 22–31, 2017. URL https://proceedings.mlr.press/v70/achiam17a.html.
John P. Agapiou, Alexander Sasha Vezhnevets, Edgar A. Duéñez-Guzmán, Jayd Matyas, Yiran Mao, Peter Sunehag, Raphael Köster, Udari Madhushani, Kavya Kopparapu, Ramona Comanescu, DJ Strouse, Michael B. Johanson, Sukhdeep Singh, Julia Haas, Igor Mordatch, Dean Mobbs, and Joel Z. Leibo. Melting Pot 2.0. arXiv preprint arXiv:2211.13746, 2022. URL https://arxiv.org/abs/2211.13746.
Eitan Altman. Constrained Markov Decision Processes. Chapman and Hall/CRC, 1999. URL https://www-sop.inria.fr/members/Eitan.Altman/PAPERS/h.pdf.
Charles Beattie, Thomas Köppe, Edgar A. Duéñez-Guzmán, and Joel Z. Leibo. DeepMind Lab2D. arXiv preprint arXiv:2011.07027, 2020. URL https://arxiv.org/abs/2011.07027.
Dongsheng Ding, Xiaohan Wei, Zhuoran Yang, Zhaoran Wang, and Mihailo Jovanovic. Provably efficient generalized Lagrangian policy optimization for safe multi-agent reinforcement learning. In Proceedings of The 5th Annual Learning for Dynamics and Control Conference, volume 211 of Proceedings of Machine Learning Research, pp. 315–332, 2023. URL https://proceedings.mlr.press/v211/ding23a.html.
Axel Dreves. How to select a solution in generalized Nash equilibrium problems. Journal of Optimization Theory and Applications, 178:973–997, 2018. URL https://doi.org/10.1007/s10957-018-1327-0.
Francisco Facchinei and Christian Kanzow. Generalized Nash equilibrium problems. Annals of Operations Research, 175:177–211, 2010. URL https://doi.org/10.1007/s10479-009-0653-x.
Luca Franceschi, Michele Donini, Paolo Frasconi, and Massimiliano Pontil. Forward and reverse gradient-based hyperparameter optimization. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pp. 1165–1173, 2017. URL https://proceedings.mlr.press/v70/franceschi17a.html.
Riccardo Grazzi, Luca Franceschi, Massimiliano Pontil, and Saverio Salzo. On the iteration complexity of hypergradient computation. In Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pp. 3748–3758, 2020. URL https://proceedings.mlr.press/v119/grazzi20a.html.
Edward Grefenstette, Brandon Amos, Denis Yarats, Phu Mon Htut, Artem Molchanov, Franziska Meier, Douwe Kiela, Kyunghyun Cho, and Soumith Chintala. Generalized inner loop meta-learning. arXiv preprint arXiv:1910.01727, 2019. URL https://arxiv.org/abs/1910.01727.
Shangding Gu, Jakub Grudzien Kuba, Munning Wen, Ruiqing Chen, Ziyan Wang, Zheng Tian, Jun Wang, Alois Knoll, and Yaodong Yang. Multi-agent constrained policy optimisation. arXiv preprint arXiv:2110.02793, 2021. URL https://arxiv.org/abs/2110.02793.
Quanyi Li, Zhenghao Peng, Lan Feng, Qihang Zhang, Zhenghai Xue, and Bolei Zhou. MetaDrive: Composing diverse driving scenarios for generalizable reinforcement learning. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(3):3461–3475, 2023. URL https://doi.org/10.1109/TPAMI.2022.3190471.
Zeyang Li and Navid Azizan. Safe multi-agent reinforcement learning with convergence to generalized Nash equilibrium. arXiv preprint arXiv:2411.15036, 2024. URL https://arxiv.org/abs/2411.15036.
Songtao Lu, Kaiqing Zhang, Tianyi Chen, Tamer Başar, and Lior Horesh. Decentralized policy gradient descent ascent for safe multi-agent reinforcement learning. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pp. 8767–8775, 2021. URL https://ojs.aaai.org/index.php/AAAI/article/view/17062.
Koichi Nabetani, Paul Tseng, and Masao Fukushima. Parametrized variational inequality approaches to generalized Nash equilibrium problems with shared constraints. Computational Optimization and Applications, 48:423–452, 2011. URL https://doi.org/10.1007/s10589-009-9256-3.
Kingsley Nweye, Kathryn Kaspar, Giacomo Buscemi, Tiago Fonseca, Giuseppe Pinto, Dipanjan Ghose, Satvik Duddukuru, Pavani Pratapa, Han Li, Javad Mohammadi, Luis Lino Ferreira, Tianzhen Hong, Mohamed Ouf, Alfonso Capozzoli, and Zoltan Nagy. CityLearn v2: Energy-flexible, resilient, occupant-centric, and carbon-aware management of grid-interactive communities. Journal of Building Performance Simulation, 18(1):17–38, 2025. URL https://doi.org/10.1080/19401493.2024.2418813.
Mark Pustilnik and Francesco Borrelli. Generalized Nash equilibrium solutions in dynamic games with shared constraints. arXiv preprint arXiv:2502.19569, 2025. URL https://arxiv.org/abs/2502.19569.
Isaac Remy, David Fridovich-Keil, and Karen Leung. Learning responsibility allocations for multi-agent interactions: A differentiable optimization approach with control barrier functions. In American Control Conference (ACC), 2025. URL https://arxiv.org/abs/2410.07409.
J. B. Rosen. Existence and uniqueness of equilibrium points for concave n-person games. Econometrica, 33(3):520–534, 1965. URL https://www.jstor.org/stable/1911749.
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017. URL https://arxiv.org/abs/1707.06347.
Han Shen, Zhuoran Yang, and Tianyi Chen. Principled penalty-based methods for bilevel reinforcement learning and RLHF. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pp. 44774–44799, 2024. URL https://proceedings.mlr.press/v235/shen24g.html.
Adam Stooke, Joshua Achiam, and Pieter Abbeel. Responsive safety in reinforcement learning by PID Lagrangian methods. In Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pp. 9133–9143, 2020. URL https://proceedings.mlr.press/v119/stooke20a.html.
Chen Tessler, Daniel J. Mankowitz, and Shie Mannor. Reward constrained policy optimization. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id=SkfrvsA9FX.
Vinzenz Thoma, Barna Pasztor, Andreas Krause, Giorgia Ramponi, and Yifan Hu. Contextual bilevel reinforcement learning for incentive alignment. In Advances in Neural Information Processing Systems, volume 37, 2024. URL https://papers.nips.cc/paper_files/paper/2024/hash/e66309ead63bc1410d2df261a28f602d-Abstract-Conference.html.
Vinzenz Thoma, Georgios Piliouras, and Luke Marris. Deep incentive design with differentiable equilibrium blocks. arXiv preprint arXiv:2603.07705, 2026. URL https://arxiv.org/abs/2603.07705.
Risto Vuorio, Jacob Beck, Shimon Whiteson, Jakob Foerster, and Gregory Farquhar. An investigation of the bias-variance tradeoff in meta-gradients. arXiv preprint arXiv:2209.11303, 2022. URL https://arxiv.org/abs/2209.11303.
Zhongwen Xu, Hado van Hasselt, and David Silver. Meta-gradient reinforcement learning. In Advances in Neural Information Processing Systems, volume 31, 2018. URL https://papers.nips.cc/paper/7507-meta-gradient-reinforcement-learning.
Jiachen Yang, Ang Li, Mehrdad Farajtabar, Peter Sunehag, Edward Hughes, and Hongyuan Zha. Learning to incentivize other learning agents. In Advances in Neural Information Processing Systems, volume 33, 2020a. URL https://proceedings.neurips.cc/paper/2020/file/ad7ed5d47b9baceb12045a929e7e2f66-Paper.pdf.
Jiachen Yang, Ethan Wang, Rakshit Trivedi, Tuo Zhao, and Hongyuan Zha. Adaptive incentive design with multi-agent meta-gradient reinforcement learning. In Proceedings of the 21st International Conference on Autonomous Agents and Multiagent Systems, pp. 1436–1445, 2022. URL https://ifaamas.org/Proceedings/aamas2022/pdfs/p1436.pdf.
Tsung-Yen Yang, Justinian Rosca, Karthik Narasimhan, and Peter J. Ramadge. Projection-based constrained policy optimization. In International Conference on Learning Representations, 2020b. URL https://openreview.net/forum?id=rke3TJrtPS.
Xianliang Yang, Zhihao Liu, Wei Jiang, Chuheng Zhang, Li Zhao, Lei Song, and Jiang Bian. A versatile multi-agent reinforcement learning benchmark for inventory management. arXiv preprint arXiv:2306.07542, 2023. URL https://arxiv.org/abs/2306.07542.
Stephan Zheng, Alexander Trott, Sunil Srinivasa, David C. Parkes, and Richard Socher. The AI economist: Taxation policy design via two-level deep multiagent reinforcement learning. Science Advances, 8(18):eabk2607, 2022. URL https://doi.org/10.1126/sciadv.abk2607.
A EQUILIBRIUM SELECTION
We write the normalized constrained game as a variational inequality, prove that a regular equilibrium branch moves smoothly with responsibility while its active shared costs remain fixed, and extend the argument to constraint-specific responsibility columns. Two exact games in Appendix A.4 exhibit welfare variation at fixed active cost and the benefit of separate constraint columns.
A.1 NORMALIZED GAME AND ASSUMPTIONS
Agent chooses , where each is nonempty, compact, convex, and full-dimensional. Let and
For this subsection, the same positive share is used for every constraint. The effective multiplier in agent 's objective is . Dividing its stationarity condition by the positive factor leaves a common shared multiplier across agents. This gives the weighted negative-payoff field
A normalized equilibrium is a solution of
This is Rosen’s positive-weight normalization for a shared-constraint game (Rosen, 1965).
We use the following conditions.
(A1) Each and is on a neighborhood of . For fixed , is concave in , and each is convex in . There exists with for every .
(A2) Responsibility ranges over a connected, relatively open set in the simplex interior. For every , the weighted field is strongly monotone: there exists such that
(A3) On the region under consideration, the active shared constraints and active local bounds are fixed. Active local bounds can be written as owner-separable convex inequalities . Their gradients together with those of the active shared constraints are linearly independent. Active multipliers are positive, and inactive inequalities remain strictly slack.
The same conditions can be imposed only at a reference point, in which case the conclusions below hold on a sufficiently small neighborhood.
A.2 PROOF OF THEOREM 1
Existence and uniqueness. The feasible set is nonempty, compact, and convex, and is continuous. For any , the projected map
maps K continuously into itself. Brouwer's theorem therefore gives a fixed point, and the projection optimality condition is exactly Eq. (12). If and are two solutions, adding their two variational inequalities yields
Strong monotonicity in Eq. (13) forces . Hence each selects a unique normalized policy.
Smooth dependence on responsibility. Let index the active shared constraints and the active local bounds. Let contain the active shared-cost gradients as rows and the active local-bound gradients. With local multipliers and , define the active KKT residual
Because agent 's weighted stationarity block is scaled by , Eq. (14) is equivalent to its original stationarity condition with shared multiplier . Own-concavity and convex feasible best-response sets then make these KKT conditions sufficient for a constrained best response, so the selected policy is a generalized Nash equilibrium.
Let be the derivative in of the first row of Eq. (14), and let . The Jacobian in the primal-dual variables is
The symmetric part of is positive definite by strong monotonicity, convexity, and nonnegative multipliers. Suppose lies in the kernel: and . Then forces , and linear independence of the active gradients gives . The Jacobian is nonsingular.
The implicit function theorem gives a locally unique branch . Positive active multipliers and strict slackness persist by continuity. Uniqueness of the normalized policy means overlapping local branches agree, giving a smooth selection on the full region.
Active costs and welfare. For every active shared constraint k,
Assumption (A3) keeps , so throughout the branch. If welfare has a nonzero intrinsic derivative with respect to responsibility, then moving a small distance in the improving direction changes welfare while all active costs remain at those same budgets. This proves the remaining claims of Theorem 1.
A.3 CONSTRAINT-SPECIFIC RESPONSIBILITY COLUMNS
The main theorem uses one responsibility vector for all constraints. LiRA allows each shared constraint to have its own column. Around a regular primal-dual point, the same argument applies to these independent columns.
Let be nonredundant local coordinates for the product of allocation simplexes, and write for the responsibility of agent i for constraint k. Define agent i's stationarity field
For active local multipliers , the residual contains , , and . Let be the derivative of its first block in , and let be the derivative in ; its block is . The corresponding Jacobian is
Proposition 1 (Local independent-column selection). Suppose a reference primal-dual point satisfies this residual, primal and dual feasibility, and strict complementarity. Assume the smoothness and convexity conditions of (A1), smooth owner-local constraints, and nonsingularity of . Then a locally unique primal-dual branch exists for nearby . Its policies are generalized Nash equilibria, its active costs equal the same budgets, and nonzero welfare sensitivity gives different welfare at those same active costs.
Proof. Apply the implicit function theorem to the full residual. Continuity preserves multiplier signs and inactive slackness, while own-concavity makes the resulting KKT points constrained best responses. Complementarity pins every active cost at its budget, and the welfare derivative gives the final claim.
If equality of the entire cost vector is required when some constraints are inactive, let collect those inactive costs. When has locally constant rank, its level sets are smooth. A tangent direction in with nonzero welfare derivative therefore generates a local curve along which the full cost vector is fixed and welfare changes.
A.4 EXACT EXAMPLES
Two small games make the equilibrium selection result concrete. The first shows welfare varying along an active-cost level set. The second shows why different constraints may prefer different responsibility allocations.
A.4.1 WELFARE VARIATION AT FIXED ACTIVE COST
Let agents choose scalar actions . Agent prefers action , and the shared budget is . Let be the fixed welfare weight for agent , set and , and assume . Define
Compact action intervals containing the response family below can be imposed without affecting the solution. For any simplex allocation, the positive-aggregate active equilibrium is
To see this, stationarity gives . Summing across agents and using the active constraint gives Eq. (19). The weighted field is diagonal and strongly monotone, so this family satisfies the assumptions of Theorem 1.
Substituting the equilibrium into welfare gives
The active cost is identical for every allocation, yet welfare is not. Unequal welfare weights make the uniform allocation strictly suboptimal; with equal weights, uniform is optimal but welfare still changes away from it.
A.4.2 WHY SEPARATE CONSTRAINT COLUMNS CAN MATTER
Now consider two agents with two-dimensional actions and . Both prefer , and the shared constraints are for . Let
with welfare . Let be agent 1's responsibility share for constraint ; agent 2 receives . The equilibrium is
The two stationarity equations in each coordinate first determine the shared multiplier and then the individual actions. The losses are strongly convex and the constraints are linear, so these points are global constrained best responses. Both shared costs equal one for every .
At this equilibrium,
Its Hessian is , so the unique optimum is with . If the two responsibility columns are tied, , then , with equality at . Independent columns therefore improve the best tied welfare by without changing either shared cost. The two constraints prefer opposite allocations because the reward externalities have opposite signs across coordinates.
B FINITE-TRAINING RESPONSIBILITY GRADIENT
Theorem 2 differentiates welfare through a random sequence of learner updates. The proof conditions on the sampled training history, differentiates welfare through the recorded updates at fixed data, and then differentiates the probability of that history. These two derivatives yield the direct-unrolling and sampling-correction terms.
B.1 TRAINING-HISTORY DISTRIBUTION
Let be the allocation parameter and let be fixed during one outer update. Write for the complete sequence of training batches. Given a realized history, the learner states are deterministic. For fresh batches, the joint sampling law is
With a persistent collector, the same argument uses the corresponding history-conditioned sampling factors.
To separate the two sources of dependence, let denote the total derivative in Eq. (8), taken while the realized raw trajectories are held fixed. Observations, actions, rewards, costs, terminal flags, and other exogenous samples are fixed; learner quantities derived from them are not. For a scalar, is a column gradient. In particular,
The proof assumes that the conditional sampling laws share parameter-independent support, the recorded learner maps and welfare are differentiable almost surely, and differentiation can be exchanged with integration. For piecewise-smooth learner updates, these conditions are understood on the realized differentiable branches.
B.2 PROOF OF THEOREM 2
Using Eq. (25),
The first term differentiates welfare through the learner for a fixed training history. The second differentiates the probability of seeing that history. This proves Eq. (8).
B.3 POLICY-SCORE FORM
The sampling correction can be evaluated without differentiating the environment. Let denote the transition law and the reset law. For a trajectory with states , local observations , and joint actions ,
At a fixed realized trajectory, the environment factors do not depend on . The batch score therefore reduces to policy scores:
Each sampled action appears once, even if the same batch is reused for multiple policy-optimization epochs.
B.4 TERMINAL WELFARE ESTIMATE
For a terminal rollout , let
be its original social return. Given the training history, draw fresh terminal rollouts under and define
Conditioned on the training history, these estimate and , respectively. In a general-sum game, the social return weights every agent's policy score, preserving the effect of one agent's action on the others' rewards.
B.5 LEAVE-ONE-OUT CENTERING
For independent continuations from the same checkpoint, let and let be the baseline in Eq. (10). A score has conditional mean zero:
Because is constructed only from the other independent continuations, . Together with the conditional unbiasedness of the terminal estimates,
Thus leave-one-out centering changes neither term in expectation. The continuation estimates need not be mutually independent after centering, because their baselines share the other continuations' returns; only the independence between a continuation's score and its own baseline is used.
C LOOKAHEAD IMPLEMENTATION
C.1 PPO AND CRITIC UPDATES
Let denote agent 's actor parameters within a PPO epoch and the parameters used to collect the batch. Let and be the reward and shared-cost advantages. For a fixed responsibility allocation, the effective advantage and policy ratio are
Let be the clipping radius, the entropy coefficient, policy entropy, and a masked average over valid samples. The clipped loss is
PPO clips the combined reward-and-cost advantage (Schulman et al., 2017). In CityLearn, the reward advantages are the per-building, per-step comfort rewards standardized within each batch; the cost advantages are the district cap excess standardized over that batch. The critics regress to the corresponding unnormalized per-step sum of building rewards and district cap excess.
C.2 WHAT THE LOOKAHEAD DIFFERENTIATES
The CityLearn probe starts from copies of the live actors, critics, and Adam moments. Each fresh batch gives one functional PPO actor–critic update and one differentiable Adam step. The next batch is collected under the updated probe policy. The shared multiplier is held at its checkpoint value during this q-step probe to isolate responsibility redistribution at the current dual scale; it is updated in the live learner on the schedule specified in Appendix D.1.
Within a probe update, stored behavior log-probabilities, normalized advantages, and critic targets are held fixed. Differentiation follows the actor and critic updates and the carried Adam moments, while the training-history score accounts for actions collected under the changing probe policies. The PPO implementation therefore uses a stopped-batch approximation to the exact direct derivative in Theorem 2: its sampling correction does not restore derivatives omitted from the update itself.
C.3 ALLOCATION AND ONLINE UPDATES
For logits and a fixed floor ,
The floor keeps shares away from zero; setting it to zero recovers softmax. Adding a constant to a logit column leaves its allocation unchanged. The equilibrium proofs use nonredundant local simplex coordinates, whereas autodiff can operate directly on the logits. An ascent optimizer applies Eq. (10) to update .
Algorithm 1 uses a lookahead from the current checkpoint. Each of its independent continuations takes probe updates at fixed responsibility, collecting fresh training batches and terminal rollouts. After the outer step, the live learner takes updates from that checkpoint under the new allocation, producing the full learner state . Held-out evaluation measures its policy without changing that state. The next cycle uses (written above) as its checkpoint and retains the updated , carrying forward the actors, critics, optimizer state, and shared multipliers from the live continuation.
C.4 COMPUTATION AND EVALUATION
The terminal rollouts used in the meta-gradient train ; separate reporting rollouts evaluate the resulting policy. Appendix D.1 records benchmark settings and evaluation conventions for Table 1. A responsibility-update cycle uses probe batches and live batches, in addition to terminal and held-out evaluation rollouts. The lookahead cost is part of the method's computation budget.
D EXPERIMENTAL PROTOCOLS AND REWARD COMPONENTS
D.1 BENCHMARK SETUP FOR SECTION 4.1
We use the same training seed identifiers across methods within each task: three seeds, except six for MetaDrive. We first summarize the held-out evaluations within each seed; Table 1 reports the mean and sample standard deviation across these seed-level values. Costs and welfare retain each benchmark's native units.
CityLearn. We use CityLearn v2 (Nweye et al., 2025) with the three buildings in citylearn_cha llenge_2023_phase_1. Welfare is the sum of native ComfortReward across buildings and steps. Shared cost accumulates only the positive excess of district net electricity over the per-step grid cap. The experiments have a 719-step cap-exceedance budget of 28.76 kWh () and use seeds 1101–1103, 30 outer cycles, live PPO updates per cycle, 12-step live rollouts, four PPO epochs, shared-dual initialization 2.0, and dual learning rate 0.05. For each CityLearn lookahead, every probe step collects a fresh 12-step batch and makes one functional PPO/Adam actor-critic update. The shared multiplier stays fixed during the probe. A separate 12-step terminal rollout supplies the mean per-step comfort reward for the allocation update; its action scores and the training-batch scores are both divided by the 12-step batch length. Before the outer optimizer, this scales Eq. (10)'s unnormalized score estimate by 1/12. After the allocation update, the live learner instead takes fresh batches with four PPO epochs each, then updates the shared multiplier once from their mean grid excess. That dual update compares mean per-step excess against 0.04 kWh. The held-out values in Table 1 are 719-step episode totals, rather than the probe's short-rollout objective. The LiRA reference point uses in both Table 1 and Table 3. The local search changes one coordinate at a time on the same three training seeds, keeping live updates per outer cycle.
In this setting, PAL starts with three equal per-building multipliers. Their updates use the same district cost and budget, so they remain equal and produce the same result as Uniform.
MABIM. The inventory experiment has N = 400 controlled SKU agents and K = 2 shared rejection-cost coordinates: warehouse 0/store 2 and warehouse 1/store 1. For Table 1, we use training seeds 1101–1103, q = 5, M = 6 lookahead, ten outer cycles (50 committed updates), and budgets calibrated on a validation period separate from the held-out test period. Held-out evaluation pairs the same eight action seeds across LiRA, Uniform, and PAL. Each training seed contributes the mean of these eight held-out rollouts to Table 1; the displayed spread is across training seeds.
Harvest. The Harvest task uses seven agents on the Melting Pot (Agapiou et al., 2022) substrate commons_harvest_open, built on Lab2D (Beattie et al., 2020), and one episode-level shared cost with budget 68. The three training seeds are 10411, 10442, and 10473. The LiRA setting uses 60 response updates, q = 10, M = 4, and responsibility step size 0.15, with an allocation update every five response updates. The shared dual starts at 0.3 and uses step size 0.05. Each training seed is evaluated on five held-out episodes with native stochastic resets.
MetaDrive. MetaDrive uses six matched training seeds (211–216), a shared dual learning rate across all three arms, and the active training-time cost budget per actual environment step (shown in Table 1 as events per 1000 actual held-out steps, the same threshold on that display scale). All three arms start from the same competent fixed actor checkpoint and are evaluated on the same 13 held-out episode seeds; welfare is the mean per-episode welfare and cost is the number of native shared-cost events per 1000 steps actually run. Within each training seed, we average welfare over the 13 episodes and divide the total event count by their total realized steps to obtain the cost rate. Table 1 then aggregates these six seed-level values.
D.2 CITYLEARN MECHANISM DETAILS
Figure 2 uses seed 1102 with , , and . Comfort states are classified against the effective ComfortReward band. Table 4 separates the cold, warm, and in-band contributions to the comfort changes in Table 2.
Table 4: CityLearn comfort components in the matched seed-1102 episode. Cold excess is measured under Uniform; reward changes are LiRA minus Uniform.
| Cold excess (°C·steps) | ||||
|---|---|---|---|---|
| Building 1 | 586.1 | +4528.01 | -102.80 | +6.55 |
| Building 2 | 214.5 | +813.09 | -340.49 | +6.26 |
| Building 3 | 70.2 | +159.58 | -205.55 | +11.62 |
Building 1 begins with the greatest cold burden, so its reduction in cooling yields the largest comfort recovery. Across all three buildings, episode welfare increases by 4876.26 while district cap excess moves from 25.4156 to 23.7787 kWh.