Policy Optimization in Hybrid Discrete-Continuous Action Spaces via Mixed Gradients

Matias Alvo, Daniel Russo, Yash KanoriaNeurIPS 2026

TL;DR

Many real-world optimization problems require both flipping switches (discrete choices) and turning dials (continuous actions), a hybrid structure that trips up both standard black-box reinforcement learning and differentiable physics simulators. The authors introduce Mixed Gradient Policy Optimization (MGPO), an algorithm that surgically backpropagates through a simulator wherever the math is smooth while seamlessly handling discrete jumps without introducing bias. As a result, MGPO scales effortlessly to high-dimensional control tasks where standard PPO variants stall out completely.

What Problem Does This Paper Address?

Imagine managing a warehouse for 50 different products. Every day, you decide whether to send a delivery truck (a discrete yes/no choice with a flat fee) and how much of each product to put on it (50 continuous dials).

Standard model-free Reinforcement Learning (like PPO) treats the environment as a black box, estimating gradients by jiggling all 50 dials, observing a single total cost at the end of the month, and guessing which dial caused what. In high dimensions, this credit-assignment game is like trying to tune an orchestra by only listening to the volume of the final applause—signal drowns in noise.

Differentiable simulation fixes this by using the chain rule (pathwise gradients) to trace exact sensitivities directly through the simulator’s equations. However, calculus hates cliffs: a single discrete switch or discontinuous cost shatters smoothness, yielding zero or biased gradients. Historically, the moment a problem had even one discrete switch, practitioners threw away their differentiable simulators and fell back to noisy black-box RL. The authors ask: can we keep exact, smooth gradients where the physics allow, without breaking on the discrete switches?

Methods

MGPO operates on exogenous MDPs—simulators where external randomness (like customer demand or wind gusts) doesn't depend on the agent's actions, allowing recorded scenarios to be replayed counterfactually during training.

The authors factor the agent's policy into two independent heads:

  1. A stochastic discrete policy that outputs probabilities over regimes/modes (trained via standard PPO score-function updates).
  2. A deterministic continuous policy that outputs a candidate continuous action vector for each discrete mode.

The key mathematical insight is conditional smoothness: once you fix the sequence of discrete switches and exogenous noise on a forward pass, the entire trajectory becomes a completely smooth function of the continuous parameters. Applying stochastic computation graphs yields an unbiased mixed gradient with three parts:

  • Discrete gradient: Standard score-function (REINFORCE/PPO) update.
  • Pathwise (PW) term: Direct backpropagation through the simulator's costs and transitions for the continuous dials.
  • Cross term: Captures an intriguing ripple effect—how turning a continuous dial today alters future states, thereby shifting the probabilities of which discrete switches get flipped tomorrow.

The authors also show that problems with sharp cost cliffs (piecewise-smooth MDPs) can be reformulated into this hybrid setup by letting a discrete action select the smooth region.

Datasets

Because this is a control and operations research paper, it evaluates on synthetic, parameterized simulation benchmarks rather than static datasets, systematically scaling the continuous action dimension ($p$):

  • Joint Replenishment Problem (JRP): Multi-product inventory control over 100 periods with lead times, holding/shortage costs, and a discontinuous fixed ordering cost ($p$ scaled from 1 to 60).
  • Switched Linear Quadratic Regulator (S-LQR): A classic control benchmark extended with $J \in \{2, 8\}$ discrete operating modes, each governing distinct linear dynamics and quadratic cost matrices ($p$ scaled from 1 to 48).

Key Insights and Ideas

  • Conditional Smoothness Sidesteps Relaxations: Previous attempts to push gradients through discrete actions relied on "smoothing" switches (like Gumbel-Softmax or Straight-Through estimators), which either require simulators to run nonsensical "half-trucks" or introduce permanent gradient bias. Conditioning on sampled discrete actions gives exact, unbiased gradients on the true objective.
  • Why Black-Box RL Fails at Scale: Comparing gradient directional consistency (cosine alignment across batches) reveals that standard score-function gradients collapse to near-zero alignment once $p > 3$. MGPO's mixed gradient maintains $>0.8$ alignment all the way to $p = 48$ at moderate optimality gaps.
  • An Envelope Theorem for RL (Decentralization): That "cross term" entangles the continuous and discrete policies, requiring centralized access to both networks' internals. However, the authors prove (Theorem 2) that as the discrete policy approaches a best response, the cross term vanishes. Intuitively, if the discrete switch-flipper is already optimal, tiny nudges to the state won't cause first-order losses via probability shifts. Even better: near optimality, the cross term is a vanishing signal buried in rising variance, meaning dropping it entirely (MGPONoCross) enables decentralized training and can actually stabilize learning!

Key Results

MGPO dramatically outperforms Hybrid PPO (H-PPO) and HyAR as continuous dimensions grow:

Figure 1: Median number of policy updates required for MGPO and H-PPO to reach 10% of the best observed run, as the continuous action dimension p increases, on the JRP (left) and switched LQR (right). We consider 10 independent trials per configuration. Vertical arrows represent configurations for which the median does not reach the target within the allotted budget.
  • Switched LQR: With $J=8$ modes, H-PPO fails to converge within the budget once $p \ge 20$. With $J=2$, H-PPO needs ~3,600 updates at $p=48$. MGPO reaches within 5% of best performance across all dimensions up to $p=48$ in roughly 1,000 updates (and under 200 updates for $J=2$). Against an analytical single-mode Riccati baseline ($J=4$), MGPO improves costs by 19% to 38% by actively exploiting mode-switching.
  • Inventory Control (JRP): Required updates for H-PPO shoot up steeply with dimension, failing past $p=20$ (at batch size 16), whereas MGPO scales smoothly up to $p=40$ and achieves lower test loss with a batch size of 16 than H-PPO manages with a batch size of 64 for $p \ge 50$.
  • Dropping the Cross Term: Ablating the cross term (MGPONoCross) causes at most a minor ~2% dip in JRP (up to 6% in one edge case), while improving performance in S-LQR across dimensions.

Limitations and Future Work

  • Simulator Requirements: MGPO is not a universal drop-in for black-box RL. It requires training-time access to a differentiable simulator with known, piecewise-smooth dynamics and exogenous randomness (e.g., if an agent's action changes the probability distribution of external noise itself, replay breaks down).
  • Long Horizons & Chaotic Contacts: Pathwise gradients are notorious for exploding or vanishing over very long horizons or stiff, contact-rich physics. Combining MGPO with truncated backpropagation and critic bootstrapping is a natural next step.
  • Deterministic Limits: The theoretical proof for the vanishing cross term relies on smooth, stochastic discrete policies (e.g., entropy-regularized); analyzing the mathematical limit as discrete policies become strictly deterministic remains open, alongside scaling to multi-echelon logistics and robotics.

Summary updated

Abstract

We study reinforcement learning in hybrid discrete–continuous action spaces, such as settings where the discrete component selects a regime (or index) and the continuous component optimizes within it — a structure common in robotics, control, and operations problems. Standard model-free policy gradient methods rely on score-function (SF) estimators and suffer from severe credit-assignment issues in high-dimensional settings, leading to poor gradient quality. On the other hand, differentiable simulation largely sidesteps these issues by backpropagating through a simulator, but the presence of discrete actions or non-smooth dynamics yields biased or uninformative gradients. To address this, we propose Mixed Gradient Policy Optimization (MGPO), which backpropagates through the simulator wherever smoothness permits, using a mixed gradient estimator that combines pathwise and SF gradients while maintaining unbiasedness. We also show how problems with action discontinuities can be reformulated in hybrid form, further broadening its applicability. Empirically, MGPO substantially outperforms Hybrid PPO on inventory control and switched linear-quadratic regulator problems, with performance gaps increasing as the continuous action dimension grows. Finally, we characterize the structure of the mixed gradient, showing that its cross term — which captures how continuous actions influence future discrete decisions — becomes negligible near a discrete best response, thereby enabling approximate decentralized updates of the continuous and discrete components and reducing variance near optimality.
BibTeX
@inproceedings{alvo2026policy,
  author = {Matias Alvo and Daniel Russo and Yash Kanoria},
  title = {{Policy Optimization in Hybrid Discrete-Continuous Action Spaces via Mixed Gradients}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=cqg3IKxaHY},
}
Figure