Decision-Focused Learning in MDPs: An Occupancy Measure Approach
Authors: Zihao Zhao, Ashwath K. Karunakaram, Ali Eshragh, Yuexing Li, Kai Wang
Organizations: Georgia Institute of Technology, Atlanta, GA · Johns Hopkins Carey Business School, Washington, DC · International Computer Science Institute, Berkeley, CA
In this work, we consider decision-focused learning (DFL) for a Markov decision process (MDP), where existing methods differentiate through the KKT conditions of the Bellman equation and require solving a linear system over all state-action pairs, limiting its scalability. We address this by reformulating the MDP as an occupancy measure-based linear program (LP), whose feasible region is induced by predicted dynamics, and we derive a closed-form gradient by identifying the active constraints in the feasible polyhedron via the pivoting algorithm. This occupancy measure-based LP layer raises two challenges: (1) LP's solution gradient is discontinuous when active constraints change, and (2) the LP backward cost still scales with the state size, which is costly for large or continuous state spaces. We address the challenges with an augmented Lagrangian surrogate and smooth the boundary jumps by random row sketching of the constraints, and a learnable soft state-aggregation layer and its function-approximation generalization that scales the LP to large finite and continuous-state MDPs. Across multiple tasks, our methods reach lower regret than KKT-based DFL and two-stage baselines with significantly lower computation cost. The source code for all experiments is available at https://github.com/A-Eshragh/State_Aggregation_Project.
Figures & tables
Metric
KKT
LP (ours)
LP + State Agg (ours)
Core Matrix to Invert
KKT System ( [ 48 ] , Eq.(7))
Optimal Basis HθB
Aggregated Basis H^θB
Matrix Dimension
∣S∣∣A∣×∣S∣∣A∣
∣S∣×∣S∣
M×M
Inversion Complexity
O((∣S∣∣A∣)ω)
O(∣S∣ω)
O(Mω)
Table 1: Comparison of computational complexity between the KKT approach, our LP approach, and our soft state-aggregation extension. Here M denotes the number of aggregated states with M≪∣S∣ and ω<2.373 denotes the matrix multiplication exponent.
Figure 1: Loss (top) and gradient (bottom) of three DFL objectives as λpred varies; red dashed indicate λtrue and green dots indicate the loss minimum. (1) The occupancy proxy has a shifted minimum. (2) The augmented Lagrangian has a minimum at the true parameter. (3) Sketch averaging empirically reduces boundary sensitivity.
Figure 2: Training reward across epochs on three tasks. DFL-QP and DFL-SA achieve the highest training rewards, while DFL-Sketch and the other LP-based variants are generally competitive with the two-stage baseline.
Figure 3: Test regret on three tasks (lower is better). DFL-Sketch improves over DFL-LP on Inventory and CartPole, showing the benefit of smoothing across basis changes. DFL-SA further achieves regret close to DFL-QP at substantially lower cost.
Figure 4: Total training time for different tasks. DFL-QP is the most expensive method because it differentiates through the full KKT system. DFL-Sketch adds overhead from solving multiple sketched LP s, while DFL-SA reduces this cost through state aggregation.
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
Inventory
Cliff Walking
CartPole
MDP
State space size ∣S∣
36 ( smax=30 , bmax=5 )
48 ( 4×12 grid)
continuous, R4
Action space size ∣A∣
31 ( amax=30 )
4
2
Discount β
0.95
0.95
0.99
Horizon T
N/A
N/A
200
Predictor / features
Appendix
Table 2: Key hyperparameters and model architectures for each task.
Method
Mean regret ↓
SE
Wins vs. TS
Two-stage
14.75
0.29
–
DFL-LP
14.14
0.18
7/10
DFL-Sketch
11.34
1.44
8/10
DFL-QP
9.53
0.84
10/10
DFL-SA ( M=6 )
7.21
0.15
10/10
DFL-SA ( M=12 )
7.76
0.15
10/10
Appendix
Table 3: Paired Cliff Walking test regret over 10 random seeds. Lower regret is better. Win counts compare each method against the two-stage baseline on the same seed. SE denotes the standard error of the mean.
Method
Best-so-far reward
DFL-LP
170.5±32.7
DFL-QP
192.4±12.6
Two-stage (BC + LP, no DFL gradient)
168.1±24.8
MBRL (no BC anywhere)
136.8±66.6
MBRL + BC reward shaping ( α=2 )
127.3±61.3
Appendix
Table 4: CartPole best-so-far reward (mean ± standard deviation). The MBRL rows use 5 seeds and the additional configuration described above; the table does not establish a matched-data comparison.
Method
Test regret ↓
Total (s)
Two-stage
24.537±4.573
68.2±11.2
DFL-QP
19.121±2.156
3649.4±165.5
DFL-LP
23.056±3.294
972.0±34.0
DFL-Feas
22.834±3.414
871.0±15.7
DFL-Sketch (Ours)
19.434±2.363
897.7±33.2
DFL-SA ( M=10 ) (Ours)
22.659±2.589
226.5±8.0
Appendix
Table 5: Larger inventory MDP, ∣S∣×∣A∣=51×31=1581 (mean ± standard error over 10 seeds).
Method
Test regret ↓
Total (s)
Two-stage
53.788±7.710
227.3±6.4
DFL-QP
44.545±5.823
34791.0±756.4
DFL-LP
40.690±4.946
19915.3±527.1
DFL-Feas
62.904±8.230
19832.6±618.7
DFL-Sketch (Ours)
48.591±5.718
13790.6±513.4
DFL-SA ( M=10 ) (Ours)
42.568±5.814
540.6±3.8
Appendix
Table 6: Larger inventory MDP, ∣S∣×∣A∣=101×31=3131 (mean ± standard error over 10 seeds).
ρ
Test regret ↓
Flow-constraint MSE
1
15.629±2.296
23.98
10
14.845±1.877
23.07
102
14.124±1.808
21.26
103
12.819±1.185
18.00
104 (used in the paper)
12.552±0.991
17.82
105
13.305±1.458
17.26
Appendix
Table 7: Sensitivity of DFL-QP on the inventory MDP to the penalty weight ρ (mean ± standard error over 10 seeds).
LP layer
Test regret ↓
Infeasible train solves
Hard
63.024±4.911
0.0%
Proj-LP (no diagonal step)
24.147±5.758
61.8%
Proj-MDP (DFL-SA)
14.966±2.319
0.0%
Appendix
Table 8: Ablation of the diagonal projection on the inventory MDP ( M=10 ; mean ± standard error over 10 seeds).
Decision-focused learning (DFL) trains predictive models by optimizing downstream decision quality rather than standalone prediction accuracy. For contextual linear optimization, most existing DFL methods assume offline data and full observations of the objective cost vector. We develop an on-policy learning method for sequential contextual linear optimization under partial feedback, generalizing the standard bandit feedback setting. Our method learns a stochastic predict-then-optimize policy that samples a cost-vector prediction from a conditional distribution and solves the resulting downstream linear optimization problem. To update this distributional model, we introduce a two-component hybrid gradient estimator. The first component is a score function estimator, which provides an unbiased but potentially high-variance policy gradient estimate. The second is a decision-focused plug-in component that uses an auxiliary nuisance estimate of the latent cost vector to exploit the downstream optimization structure, becoming more informative as the estimate improves. We prove an O(T−1/2) bound on the average squared policy-gradient norm, matching the standard non-convex SGD rate. Experiments on top-k selection, shortest path, combinatorial pricing, and a real-data energy-scheduling benchmark show that the hybrid gradient approach achieves lower cumulative regret than contextual-bandit-style baselines across all benchmarks, using both Gaussian and richer conditional generative models. Code is available at https://github.com/Joeyetinghan/on-policy-bandit-dfl.
Wyame Benslimane, Tinghan Ye, Pascal Van Hentenryck +1
Department of Industrial Engineering and Operations Research University of California, Berkeley · H. Milton Stewart School of Industrial and Systems Engineering Georgia Institute of Technology
Decision-Focused Learning (DFL) trains predictors to improve downstream decision quality, but computing regret gradients typically requires differentiating through solvers or relying on surrogate losses, which can be computationally expensive or deviate from the true objective. We show that, under standard regularity with locally stable active constraints, the regret gradient admits a closed-form geometric characterization, equivalent to the prediction error projected onto the tangent space of active constraints, scaled by local curvature. This reveals that regret gradients can be obtained by filtering decision-irrelevant components from the MSE gradient, providing a simpler and more direct alternative to existing approaches. Based on this, we propose PEAR (Projected Error As Regret-gradient), which computes regret gradients via a reduced linear system over active constraints, avoiding differentiation through solver iterations or additional optimization solves. Experiments on LP benchmarks and a real-world QP task show that PEAR achieves the best decision quality among all baselines while being the most computationally efficient, with gains that persist under constraint shifts.
Junhyeong Lee, Sangjin Jin, Yongjae Lee
Department of Industrial Engineering, Ulsan National Institute of Science and Technology, Ulsan, South Korea.
Learning the optimal policy for Markov decision process problems (MDPs) from samples is a fundamental problem in online and data-driven decision-making. Function approximations are usually deployed to handle large or infinite state-action space. In our work, we consider the MDP problems with function approximation and we develop a new algorithm to solve it efficiently. Our algorithm is based on a linear programming (LP) reformulation and repeatedly resolves the identified reduced linear system as new transition samples arrive. After the optimal basis is identified, we show that, after N resolving rounds, the expected averaged iterate achieves an instance-dependent O(Cinst/N) objective shortfall and signed constraint residual. We separately account for the historical samples used for basis identification and the d2 transition queries used in each resolving round, which yields the corresponding total transition-query complexity. We further complement our result with a \textit{robust} O(1/N) bound that is independent of Δ. In comparison to the guarantees established in the previous literature, our instance dependent guarantee is tighter when the underlying instance is favorable, and the numerical experiments also reveal the wide applications and efficient empirical performances of our algorithms.
Jiashuo Jiang, Yinyu Ye, Yiming Zong
Department of Industrial Engineering & Decision Analytics, The Hong Kong University of Science and Technology · Department of Management Science & Engineering, Stanford University