Papers › Contextual Bilevel Reinforcement Learning for Incentive Alignment

Contextual Bilevel Reinforcement Learning for Incentive Alignment

3 Jun 2024arXiv:2406.01575archive 2025-07-28

Vinzenz Thoma, Barna Pasztor, Andreas Krause, Giorgia Ramponi, Yifan Hu

The optimal policy in various real-world strategic decision-making problems depends both on the environmental configuration and exogenous events. For these settings, we introduce Contextual Bilevel Reinforcement Learning (CB-RL), a stochastic bilevel decision-making model, where the lower level consists of solving a contextual Markov Decision Process (CMDP). CB-RL can be viewed as a Stackelberg Game where the leader and a random context beyond the leader's control together decide the setup of many MDPs that potentially multiple followers best respond to. This framework extends beyond traditional bilevel optimization and finds relevance in diverse fields such as RLHF, tax design, reward shaping, contract theory and mechanism design. We propose a stochastic Hyper Policy Gradient Descent (HPGD) algorithm to solve CB-RL, and demonstrate its convergence. Notably, HPGD uses stochastic hypergradient estimates, based on observations of the followers' trajectories. Therefore, it allows followers to use any training procedure and the leader to be agnostic of the specific algorithm, which aligns with various real-world scenarios. We further consider the setting when the leader can influence the training of followers and propose an accelerated algorithm. We empirically demonstrate the performance of our algorithm for reward shaping and tax design.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2406.01575")

Code

Syntology Ran 8 of 13 code samples harvested from 1 repository linked to this paper; 5 have no recorded run. Of those that ran: 8 ran with no contract checked.

By repository: official repository: 13 samples from 1 repository, 8 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

lasgroup/hpgd officialmentioned in papermentioned on GitHubjaxMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

13 samples harvested; 8 ran; 0 honoured the contract we drafted; 5 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

8ran
5unverified

Licence: 0 of the 13 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from lasgroup/hpgd. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

apply_greedy_policy lasgroup/hpgd/train_stochastic_bilevel_opt.py official repository ran MIT (permissive) · 90bf283f158bfaef · report
default_reward_function lasgroup/hpgd/src/environments/utils.py official repository ran MIT (permissive) · fcab5c91a12d6c1e · report
incentive_transform lasgroup/hpgd/src/models/IncentiveModel.py official repository ran MIT (permissive) · e1d1608d2719c09d · report
normalize_discounted_rewards lasgroup/hpgd/src/algorithms/utils.py official repository ran fingerprinted MIT (permissive) · 1fa8c23d22d4dd92 · report
random_normal_perturbations lasgroup/hpgd/train_tax_design_zero_order.py official repository ran MIT (permissive) · cf39e222b919e4f0 · report
random_split_like_tree lasgroup/hpgd/train_zero_order.py official repository ran MIT (permissive) · 8aaaff5f138c1764 · report
regularized_softmax lasgroup/hpgd/train_stochastic_bilevel_opt.py official repository ran MIT (permissive) · 5e8fb421a069c1de · report
sample_array lasgroup/hpgd/src/environments/utils.py official repository ran MIT (permissive) · 6a60b610c1b46d4e · report
clip_norm lasgroup/hpgd/train_stochastic_bilevel_opt.py official repository unverified MIT (permissive) · 75b917a4731eaf8a · report
get_actions_from_q_values lasgroup/hpgd/src/algorithms/Regularized_DQN.py official repository unverified MIT (permissive) · d811aaa5f794375d · report
string_to_bool_map lasgroup/hpgd/src/environments/utils.py official repository unverified MIT (permissive) · caa8707bc43176db · report
tree_random_normal_like lasgroup/hpgd/train_zero_order.py official repository unverified MIT (permissive) · a944954ab6dc61d0 · report
update_value_functions lasgroup/hpgd/train_amd.py official repository unverified MIT (permissive) · 45825551bc380031 · report

Tasks

Bilevel OptimizationDecision MakingReinforcement Learningreinforcement-learning

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections