TL;DR
When training machine learning models to guide sequential decisions, predicting the world accurately isn't always the same as acting in it optimally. This paper introduces a fast, scalable way to train predictive models end-to-end through a Markov Decision Process (MDP) by reframing the planning step as a Linear Program (LP) over how frequently states and actions are visited. By pairing a clever loss function with learned state compression, this approach makes better decisions than standard baselines while running up to 40× faster than existing end-to-end methods.
What Problem Does This Paper Address?
Imagine managing inventory under uncertain customer demand. Typically, you'd build a two-stage pipeline: first, train a model to forecast demand using Mean Squared Error (MSE); second, plug that forecast into an MDP solver to decide how much stock to order. The catch? Minimizing MSE treats all prediction errors equally, even when a tiny underestimate causes a catastrophic stockout while a large overestimate barely matters.
Decision-Focused Learning (DFL) fixes this by pushing gradients directly from the final decision quality back into the predictor. However, differentiating through an MDP usually requires differentiating through the Karush–Kuhn–Tucker (KKT) optimality conditions of the nonlinear Bellman equation. That forces you to invert a massive matrix of size $|\mathcal{S}||\mathcal{A}| \times |\mathcal{S}||\mathcal{A}|$ (states times actions) at every training step—and the math gets numerically unstable as you plan over longer horizons. Scaling DFL beyond tiny toy MDPs has consequently been hit by a computational brick wall.
Methods
Instead of wrestling with the nonlinear Bellman equation, the authors use a classic duality trick: solving an MDP as a Linear Program (LP) over occupancy measures—essentially optimizing for the discounted frequency of visiting each state-action pair.
This unlocks four novel components that work together seamlessly:
- Closed-form LP Basis Gradients: Because the LP's optimal vertex is determined solely by $|\mathcal{S}|$ active constraints, differentiating through the solver only requires inverting an $|\mathcal{S}| \times |\mathcal{S}|$ basis matrix—completely removing the action space $|\mathcal{A}|$ from the inversion bottleneck.
- Augmented Lagrangian Surrogate: Because the predictor guesses transition dynamics, the resulting LP solution is only valid in the predicted world and violates true physical flow constraints, biasing the training loss. Adding a dual linear correction and quadratic feasibility penalty anchors the global minimum firmly back at the true MDP parameters.
- Sketch-and-Solve Smoothing: LP solutions jump abruptly when the optimal vertex shifts. Rather than adding noise to the objective (standard practice), the authors randomly compress ("sketch") the constraint rows multiple times and average the solutions, smoothing out jagged gradient spikes.
- Learnable Soft State Aggregation: To conquer huge or continuous state spaces, a differentiable neural layer groups states into $M \ll |\mathcal{S}|$ abstract clusters (or $d$ continuous features), shrinking the matrix inversion all the way down to $M \times M$.
Datasets
The authors evaluate their methods across three sequential decision-making environments (no new external datasets are introduced, though task-specific noisy contextual regimes are constructed):
- Inventory Control: A finite-state MDP managing stock and backlogged orders under unknown Poisson demand predicted from features.
- Stochastic Cliff Walking: A $4 \times 12$ grid world where noisy weather features hint at hidden ice regimes that alter slip probabilities near a hazardous cliff, tested under distribution shift.
- Continuous-State CartPole: Classic control from an offline buffer of transitions collected by a behavior policy, requiring neural function approximation over continuous 4D states.
Key Insights and Ideas
- Moving constraints rescue LP gradients: Usually, differentiating directly through an LP is a dead end in DFL because slightly nudging objective weights doesn't move the optimal corner—giving you zero gradients everywhere. Here, because predicted transitions live inside the constraint matrix, the corner itself moves smoothly with the predictions, naturally yielding rich, non-zero gradients!
- Cheaper and better via learned compression: You might expect compressing states into a tiny $M \times M$ representation to hurt decision quality. Surprisingly, jointly learning how to group states alongside the predictor acts as a helpful inductive bias, beating uncompressed baselines on continuous control.
Key Results
Across all tasks, the proposed state-aggregated method (DFL-SA) matches or beats KKT-based DFL (DFL-QP) and two-stage MSE pipelines on test regret (lower is better) at a fraction of the compute:
- CartPole: DFL-SA ($d=90$) slashes mean test regret down to ~3, outperforming DFL-QP (10), unaggregated DFL-LP (24), and Two-stage (45), while training 7.5× faster than DFL-QP and 4× faster than DFL-LP.
- Inventory Scaling: On the standard grid, DFL-LP cuts training time by ~8× vs. DFL-QP. When scaled up to $|\mathcal{S}| = 101$ states, DFL-SA ($M=30$) achieves the lowest regret of all methods while running ~40× faster than DFL-QP.
- Cliff Walking: Under shifted test distributions, DFL-SA narrows regret toward DFL-QP while decisively beating Two-stage and feasibility-penalty baselines.
Limitations and Future Work
- Theoretical vs. Practical Trade-off in Sketching: While the unsketched Augmented Lagrangian provably has its global minimum at the true parameters, averaging finite random constraint sketches breaks exact flow feasibility—meaning that theoretical guarantee does not automatically carry over to the sketched loss, nor does finite averaging guarantee mathematical smoothness everywhere.
- Parallelization Overhead: Solving $K$ sketched LPs per forward pass introduces wall-clock overhead unless parallelized or paired with state aggregation.
- (Note: Explicit directions for future work are not discussed in the paper.)
Summary updated