arXiv:2610.08384cs.LGOct 2026

Manuscript Offprint

arXiv:2610.08384

Decision-Focused Learning in MDPs: An Occupancy Measure Approach

Zihao Zhao, Ashwath K. Karunakaram, Ali Eshragh, Yuexing Li, Kai Wang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

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 here.

1 Introduction

Many sequential decision-making problems require solving an optimization problem whose parameters are unknown in advance and must be predicted from contextual data, e.g., inventory control under uncertain demand [2]. Standard two-stage pipelines train a predictive model to minimize forecast error and then feed the predictions into a downstream optimizer. However, minimizing prediction error does not necessarily optimize downstream decision quality [17, 30]. Decision-focused learning (DFL) addresses this mismatch by training the predictive model end-to-end, backpropagating decision-quality gradients through the optimization layer [30].

When the downstream problem is a Markov decision process (MDP), the optimization solves the Bellman optimality equation from predicted rewards and transition probabilities [48, 21]. Existing DFL methods for MDPs typically differentiate through the Karush–Kuhn–Tucker (KKT) conditions of Bellman optimality, viewing the policy as the solution of a nonlinear system [48]. This entails solving a linear system of dimension ∣S∣∣A∣|S||A|, which is prohibitive for large state or action spaces. The Bellman operator’s nonlinearity can also make this system poorly conditioned, especially as the discount factor approaches one. These issues limit the scalability of KKT-based DFL methods.

In this work, we propose an occupancy-measure LP layer that overcomes both limitations by exploiting the linear programming (LP) formulation of MDPs over occupancy measures, whose feasible region

*Corresponding author. Email: zzhao628@gatech.edu

†^{\dagger}Equal supervision.

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

depends on the predicted dynamics. The LP has two key advantages. First, under a strictly positive initial distribution, the occupancy LP is non-degenerate, yielding a well-defined optimal basis and avoiding KKT conditioning issues. Second, differentiating through the LP layer requires inverting only a single ∣S∣×∣S∣|\mathcal{S}| \times |\mathcal{S}| basis matrix, giving a closed-form, well-conditioned gradient and substantially lower cost, especially when ∣A∣|\mathcal{A}| is large.

However, directly using the uncertain feasible region LP reformulation faces two practical challenges. (a) Biased loss minimum. Standard constrained-DFL settings typically predict only objective coefficients, whereas in MDPs, predicted parameters enter both the LP objective through rewards and the constraints through transitions. Thus, the predicted occupancy is feasible only under the predicted dynamics and generally violates the true flow constraints. Using the biased occupancy in the training loss shifts the loss minimum away from the true parameter, leading the predictor toward a biased target. (b) Gradient discontinuity. Changes in the optimal basis can cause sudden jumps in the loss and its gradients, which makes gradient-based training unstable [32, 6, 17]. To address (a), we introduce an augmented Lagrangian surrogate that adds both a linear dual correction and a quadratic penalty on the true-dynamics constraint to the training loss. With an optimal dual solution of the true LP, we prove that the true parameter is a global minimizer of this surrogate. To address (b), we apply random row sketching to the flow constraints and average the resulting LP solutions. Different sketches can select different bases, and averaging empirically reduces abrupt gradient changes near basis boundaries.

The ∣S∣×∣S∣|\mathcal{S}| \times |\mathcal{S}| cost, however, is still costly when the state space is large or continuous. To further scale up, we introduce a soft state-aggregation layer that uses a learned softmax membership matrix to compress the ∣S∣×∣S∣|\mathcal{S}| \times |\mathcal{S}| system to M×MM \times M with M≪∣S∣M \ll |\mathcal{S}|. We extend the same construction to continuous-state MDPs via function approximation. Table 1 compares the resulting computational cost with the prior KKT approach [48].

Table 1: Comparison of computational complexity between the KKT approach, our LP approach, and our soft state-aggregation extension. Here MM denotes the number of aggregated states with M≪∣S∣M \ll |\mathcal{S}| and ω<2.373\omega < 2.373 denotes the matrix multiplication exponent.

MetricKKTLP (ours)LP + State Agg (ours)
Core Matrix to InvertKKT System ([48], Eq.(7))Optimal Basis HθBH_{\theta}^{B}Aggregated Basis H^θB\hat{H}_{\theta}^{B}
Matrix Dimension∣S∣∣A∣×∣S∣∣A∣|\mathcal{S}||\mathcal{A}| \times |\mathcal{S}||\mathcal{A}|∣S∣×∣S∣|\mathcal{S}| \times |\mathcal{S}|M×MM \times M
Inversion ComplexityO((∣S∣∣A∣)ω)\mathcal{O}((|\mathcal{S}||\mathcal{A}|)^{\omega})O(∣S∣ω)\mathcal{O}(|\mathcal{S}|^{\omega})O(Mω)\mathcal{O}(M^{\omega})

Our contributions can be summarized as follows:

  • We propose a novel occupancy-measure LP layer as a differentiable MDP layer with a closed-form, well-conditioned gradient requiring inversion of a ∣S∣×∣S∣|\mathcal{S}| \times |\mathcal{S}| basis matrix.

  • We introduce an augmented Lagrangian DFL surrogate that augments the regret objective, with a global optimum guarantee, and employ random row sketching to empirically reduce sensitivity to basis changes.

  • We extend the LP layer to larger finite and continuous-state MDPs via learnable soft state aggregation and function approximation, and show competitive decision quality with lower training cost than the multiple baselines across three tasks

References (45)