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).
Department of Industrial Engineering and Operations Research University of California, Berkeley · H. Milton Stewart School of Industrial and Systems Engineering Georgia Institute of Technology
Department of Industrial Engineering & Decision Analytics, The Hong Kong University of Science and Technology · Department of Management Science & Engineering, Stanford University