Self-Referenced Regret Adversaries for Stackelberg Robust Control

Robust reinforcement learning usually trains a control policy against an adversary that changes the simulator's physics, such as a robot's mass, friction or joint damping, to make the policy fail. The adversary tends to break training in one of two ways. It can pick physics under which the task is impossible and learning stalls (a "death spiral"). Or the two players chase each other without settling. A recent line of work reframes this as a leader-follower game, called a Stackelberg game: the policy (the leader) updates while anticipating how the adversary (the follower) will react. This note makes one observation and one proposal. The observation is that in the standard zero-sum setup, where the adversary simply minimizes the policy's return, the anticipation term mostly vanishes whenever the adversary has settled on its best choice. So any leader-follower benefit has to come from giving the adversary a different objective than the policy's. The proposal is to give it one that needs no external expert: the adversary maximizes the policy's regret, measured against the best return the agent itself has previously achieved under the same physics.

Two consequences follow. First, the adversary cannot profit from impossible physics, because no past version of the agent ever did well there. This removes the pre-trained "oracle" agent that the closest prior work depends on. Second, because the adversary's objective differs from the policy's, the policy's anticipation of the adversary becomes a nonzero gradient signal. That signal is cheap to compute: the adversary's choice lives in a space of two or three physics parameters, so the second-order computations that make leader-follower methods expensive shrink to inverting a 3×3 matrix.

Core Claim

Let $\theta$ be the policy parameters and $\psi \in \Psi$ the physics parameters chosen by the adversary from a bounded uncertainty set $\Psi$. Let $V_\theta(\psi)$ be the policy's expected return under physics $\psi$, estimated by a critic that takes $\psi$ as an extra input. The leader's total gradient, when it anticipates the follower's best response $\psi^*(\theta)$, is

$$\frac{dV}{d\theta} = \nabla_\theta V_\theta(\psi^*) + \left[\frac{d\psi^*}{d\theta}\right]^\top \nabla_\psi V_\theta(\psi^*).$$

In the zero-sum case the follower minimizes $V$. At an interior best response, $\nabla_\psi V = 0$, so the second term disappears. At a best response on the boundary of $\Psi$, $\psi^*$ is typically locally constant, so the second term disappears there too. Prior reports of leader-follower gains in zero-sum settings therefore likely reflect the follower being only partly optimized, rather than genuine anticipation.

We replace the follower's objective with a self-referenced regret,

$$J_F(\theta,\psi) = U(\psi) - V_\theta(\psi) - \beta\, c(\psi),$$

where $U(\psi)$ is an "achievability critic" regressed onto an upper quantile of the returns that any past policy snapshot obtained at nearby $\psi$. The term $c(\psi)$ is a soft penalty for approaching the edge of $\Psi$, and $\beta$ is its weight. At the follower's optimum, $\nabla_\psi V = \nabla_\psi U - \beta \nabla_\psi c$, which is generally nonzero. The anticipation term then does real work: it steers the policy toward improvements that move the adversary's best choice somewhere the policy is already strong, instead of letting the adversary sit on one weakness.

We claim three things, and all three are testable. The regret adversary avoids death spirals without an oracle. The Stackelberg correction adds measurable worst-case robustness on top of simply using regret. And the combined method narrows the gap in unperturbed ("nominal") return that worst-case methods usually pay.

Relation to Prior Work

The closest work is RRL-Stack. It makes the protagonist the leader, uses implicit-differentiation policy gradients, and regularizes the adversary with the success rate of an ideal "oracle" agent. It was evaluated only on highway merging and LunarLander with actuation delay, and it names the cost of inverting second-derivative matrices as unsolved. We keep its leader-follower structure but replace the oracle with the agent's own performance history. We also restrict the follower to low-dimensional physics parameters, which makes exact implicit differentiation cheap. Finally, we test on a standard benchmark.

Three papers supply the method.

  • Stackelberg Actor-Critic derives total-derivative actor updates with a $\lambda I$ regularizer that stabilizes the matrix inversion, and finds actor-as-leader works best. Its hierarchy is only between actor and critic, in unperturbed tasks. We reuse its regularized implicit update and nest it inside an external robustness game.
  • SALT differentiates through a few unrolled adversary steps using finite-difference Hessian-vector products (a way to get second-order information from about two backward passes) and reports better fit on clean data. We need that trick only for the policy-physics cross term, because the physics-physics block is tiny.
  • ERNIE and VERONICA both make the policy lead against observation or input perturbations. Their perturbations live in high-dimensional input space, both assume smooth dynamics, and both use fixed or observation-level perturbation sets. They show the leader-follower structure helps against perturbations, but neither addresses changes to physical dynamics.

One paper constrains the design. Stackelberg Policy Gradient finds that a leader's advantage during training fades when it is evaluated against opponents it did not train with. The physics analogue of that risk is a policy tuned to its own adversary that fails on physics shifts the adversary never proposed, so we evaluate on held-out shifts of a different kind.

Three minimax baselines motivate the work by exposing the failure modes we target. RARL alternates protagonist and adversary updates. Action-robust RL mixes adversarial actions into the agent's actions. A2P scales adversary strength heuristically during training.

Research Program

Base learner and follower. The base learner is TD3, with actor and critic both conditioned on $\psi$. The follower is not a neural network. It is a point $\psi$, or a small batch of them, maintained by a few projected gradient-ascent steps on $J_F$, evaluated through the $\psi$-conditioned critic.

Implicit derivative. We compute $d\psi^*/d\theta = -(\nabla^2_{\psi\psi}J_F + \lambda I)^{-1}\nabla^2_{\psi\theta}J_F$. The first factor is a $d\times d$ matrix, with $d \le 3$ in the benchmark's uncertainty sets, so it is formed and inverted exactly. The second factor enters only as a vector product, computed with one Hessian-vector product per update.

Achievability critic. $U$ is fit to a replay buffer of (physics, episode return) pairs from all past snapshots, using an upper-quantile loss. A small fraction of episodes use uniformly sampled physics, so that $U$ has coverage everywhere in $\Psi$.

Analysis. We will measure the norm of the correction term over training in three variants: zero-sum with a fully optimized follower, zero-sum with a lagging follower, and regret. This checks the vanishing-correction claim directly. We will also report wall-clock overhead relative to plain TD3.

Known weakness. $U$ underestimates physics that are solvable but have never been solved. The adversary could then avoid exactly the hard-but-learnable regions. The uniform-exploration episodes and the quantile level are the mitigation, and we ablate both.

Baselines

The naive reference is TD3 trained only on nominal physics. This measures how much any robustness method buys over doing nothing.

Uniform domain randomization over $\Psi$ uses the benchmark's domain-randomization wrapper with the same base learner, steps and seeds. RRLS reports it to be an exceptionally strong average-case baseline, so it is the competitor to beat on average return. We beat it only if we match its average-case return while improving worst-case return.

M2TD3 and RARL-style zero-sum adversaries, as implemented through the RRLS code, are the strongest existing worst-case methods on this suite. We run them with the suite's settings and give them the same hyperparameter-search budget as our method (an equal number of configurations per task). No reported result was found on Lacuna for M2TD3 or RARL worst-case returns on RRLS, so we re-run all of them ourselves rather than quote numbers.

A2P-SAC (A2P) is the strongest heuristic fix for over-strong adversaries. It reports avoiding collapse under 0.25–2× mass and friction shifts but gives no numbers in the file. We run it under the same step budget.

Two ablations isolate the key ingredient. The first is the same regret adversary with plain simultaneous updates and no correction term. It tests whether anticipation matters beyond the choice of objective. The second is zero-sum leader-follower training. It tests the vanishing-correction prediction: we expect it to perform like zero-sum simultaneous training.

As an upper reference we add an RRL-Stack-style oracle regret. On 1D uncertainty sets only, we build the oracle from specialist policies trained on a coarse grid of physics values. This measures how much the self-referenced critic gives up relative to a true oracle.

Why not just…?

Why not just use domain randomization? It is cheap and strong on average, and it may well tie us on average-case return. Its known weakness is worst-case physics that uniform sampling rarely visits, which is the hard-example-mining argument of RARL. The decisive comparison is worst-case return on the 3D uncertainty sets, where uniform coverage is thinnest. If domain randomization matches us there as well, the adversary is not worth its cost.

Why not just scale adversary strength heuristically, as A2P does? A2P keeps the adversary from overwhelming the agent, but it still aims the adversary at impossible regions whenever the distance proxy allows. It has no notion of whether a region is solvable. The benchmark does not separate the two methods by construction, so we add a small experiment. We extend the mass range of robust-hopper to include values where hopping is physically infeasible, then measure whether each adversary concentrates its probability mass on those values and whether nominal return collapses.

Why not just use the regret objective with ordinary simultaneous updates? This is the most serious threat. The regret objective alone might account for most of the gain. The simultaneous-regret ablation settles it directly. If the Stackelberg correction adds nothing to worst-case return or training stability across the six tasks and 10 seeds, we will report the method as a regret-adversary result and drop the leader-follower claim.

Why not just constrain the adversary with divergence penalties, as SofA-SAC does? SofA-SAC bounds how far the adversary may move, but not whether the resulting task is solvable. It also costs 2–3× the training time of vanilla SAC. Our overhead is dominated by one Hessian-vector product per update, and we report measured wall-clock time against that 2–3× figure.

Proposed Experiments

Setup. Experiments use the RRLS environments robust-hopper, robust-halfcheetah, robust-walker2d, robust-ant, robust-humanoidstandup and robust-invertedpendulum. We use their 1D, 2D and 3D uncertainty sets with the suite's protocol of 5 million steps and 10 seeds.

Metrics. We report three returns: nominal return, worst-case return over a dense grid of $\Psi$, and average return over $\Psi$. We also report a transfer score on shift types the adversary never controls, namely the suite's probabilistic action-robust wrapper and sensor noise. This addresses the concern from Stackelberg Policy Gradient that a leader's advantage fades against opponents it did not train with.

Decisive checks.

  1. The correction-norm diagnostic should be near zero for zero-sum training with a converged follower and clearly nonzero for regret.
  2. Our method should beat simultaneous regret on worst-case return, with a paired test across seeds.
  3. Our method should match domain randomization on average return while beating it on worst-case return in the 3D sets.
  4. Nominal return should stay within the range of nominal TD3, which would test the SALT-derived hypothesis that leader-follower training reduces the nominal-performance penalty of robust training.
  5. On the extended infeasible-mass variant, our adversary should put little weight on infeasible masses while the zero-sum adversaries converge onto them.