arXiv:2610.01980cs.LGOct 2026

Manuscript Offprint

arXiv:2610.01980

The Curvature of Regret in Contextual Linear Optimization

Konstantinos Ziliaskopoulos, Alexander Vinel, Alice E. Smith

Abstract

Decision-focused learning for linear optimization is complicated by the discontinuity of the optimizer, where small cost errors may leave the decision unchanged or move it to a different vertex. We show that this non-smooth pointwise behavior becomes locally quadratic after averaging over the data distribution, and we derive the curvature in closed form, specifically, a matrix-valued measure supported on the walls of the normal fan. This measure depends only on the feasible set, with the data distribution entering only as a weight. We then offer a tractable approximation for this curvature, computable with just one projection to the feasible set. We prove that the approximation weakly converges to the true population curvature. We offer one application of our findings, a decision-aware scenario generation method for expected-cost linear optimization. Our experiments test the quadratic and weak convergence laws and show a 30.8% regret improvement over uniform allocation on battery arbitrage.

1 Problem Setup and Main Results

In standard Predict-then-Optimize systems, we first forecast unknown objective coefficients and then solve a linear program (LP) [1, 2, 3, 4]. Let S⊆RdS \subseteq \mathbb{R}^d be a compact convex polytope representing the feasible set. Without loss of generality, we discard cost directions orthogonal to span⁡(S−S)\operatorname{span}(S - S), since they are constant over SS and do not affect the optimizer. Then define w⋆(c)∈arg⁡min⁡w∈Sc⊤ww^\star(c) \in \arg\min_{w \in S} c^\top w, and zS(c)=min⁡w∈Sc⊤wz_S(c) = \min_{w \in S} c^\top w. For data (X,C)(X, C) and a cost predictor ff, let R(f)=E[C⊤w⋆(f(X))−zS(C)]R(f) = \mathbb{E}[C^\top w^\star(f(X)) - z_S(C)] represent the LP regret. The relevant cost vector for regret is the conditional mean Q=E[C∣X]Q = \mathbb{E}[C \mid X], not E[C]\mathbb{E}[C]. If RX⋆=inf⁡g:g(X)∈SE[C⊤g(X)−zs(C)]R_X^\star = \inf_{g: g(X) \in S} \mathbb{E}[C^\top g(X) - z_s(C)] is the best regret attainable by any decision determined by XX, then (see Lemma 1 in Appendix A for details)

R(f)−RX⋆=E[Q⊤w⋆(f(X))−zS(Q)]  .R(f)-R_{X}^{\star}=\mathbb{E}\bigl[Q^{\top}w^{\star}(f(X))-z_{S}(Q)\bigr]\;.

Thus, RX⋆R_X^\star is the best regret achievable when the decision can depend only on XX. The remaining excess regret depends on whether the decision selected using f(X)f(X) is suboptimal under Q=E[C∣X]Q = \mathbb{E}[C \mid X].

In this paper, we focus on polyhedral feasible sets SS. For each vertex vv of SS, define its optimizer cell Cv={q∈Rd:q⊤v=zS(q)}\mathcal{C}_v = \{q \in \mathbb{R}^d : q^\top v = z_S(q)\}, the region in cost space where qq induces the decision vv. Two full-dimensional cells share a wall if and only if their corresponding vertices are adjacent in SS. For adjacent vertices viv_i and vjv_j, define the wall Wij={q:q⊤vi=q⊤vj=zS(q)}W_{ij} = \{q : q^\top v_i = q^\top v_j = z_S(q)\} and jump vector dij=vi−vjd_{ij} = v_i - v_j, where Wij⊆dij⊥W_{ij} \subseteq d_{ij}^\perp. Let W(S)\mathcal{W}(S) denote the collection of walls. For W∈W(S)W \in \mathcal{W}(S) let dWd_W be either orientation of its jump vector. Under local density and smoothness assumptions, suppose that QQ has density pp and that fε(X)=Q+εh(Q)f_\varepsilon(X) = Q + \varepsilon h(Q), where εh(Q)\varepsilon h(Q) is a small prediction error. Then, in this paper, we show that

R(fε)−RX⋆=ε22κp(h)+o(ε2),κp(h)=∑W∈W(S)∫Wp(q)∥dW∥(dW⊤h(q))2dHd−1(q).(1)R(f_{\varepsilon}) - R_{X}^{\star} = \frac{\varepsilon^{2}}{2}\kappa_{p}(h) + o(\varepsilon^{2}),\qquad \kappa_{p}(h) = \sum_{W \in \mathcal{W}(S)} \int_{W} \frac{p(q)}{\|d_{W}\|} \bigl(d_{W}^{\top}h(q)\bigr)^{2} \mathrm{d}\mathcal{H}^{d-1}(q). \tag{1}

Preprint.

The intuition behind this local quadratic behavior is that a small perturbation must both reach a wall and cross it. An O(ε)O(\varepsilon) perturbation can change the optimal decision only when the cost vector lies within O(ε)O(\varepsilon) of a wall, as illustrated in Fig. 1. Each wall crossing incurs O(ε)O(\varepsilon) regret, so the expected regret is O(ε)×O(ε)=O(ε2)O(\varepsilon) \times O(\varepsilon) = O(\varepsilon^2). We therefore show that curvature is concentrated on the walls of the optimizer fan. The integrand in Eq. (1) can also be viewed as a decomposition of prediction error into the three quantities that determine decision relevance: (i) p(q)p(q), the density of the conditional cost at the wall, (ii) ∥dW∥\|d_W\|, the severity of the decision switch, and (iii) (dWTh(q)/∥dW∥)2\left(d_W^T h(q)/\|d_W\|\right)^2, the component of the error that is orthogonal to the wall. Since the curvature in Eq. (1) is concentrated on the walls, a set of zero volume, it does not appear as an ordinary Hessian at individual cost vectors, and is instead represented by the matrix-valued measure,

K0=∑W∈W(S)dWdW⊤∥dW∥Hd−1↾W.(2)K_{0}=\sum_{W\in\mathcal{W}(S)}\frac{d_{W}d_{W}^{\top}}{\|d_{W}\|}\mathcal{H}^{d-1}\upharpoonright_{W}. \tag{2}

We can also write κp=∫Rdp(q)h(q)⊤dK0h(q)\kappa_p = \int_{\mathbb{R}^d} p(q) h(q)^\top dK_0 h(q). Because K0K_0 is singular and supported on the walls, it is difficult to estimate directly. We therefore construct a smooth approximation using a quadratically regularized decision rule. Choose a reference point ss in the relative interior of SS and a regularization parameter λ>0\lambda > 0. We define,

wλ,s(q)=arg⁡min⁡w∈S{q⊤w+λ2∥w−s∥2},(3)w_{\lambda,s}(q)=\arg\min_{w\in S}\left\{q^{\top}w+\frac{\lambda}{2}\|w-s\|^{2}\right\}, \tag{3}

which also corresponds to the projection to the feasible set wλ,s(q)=ΠS(s−qλ)w_{\lambda,s}(q) = \Pi_S(s - \frac{q}{\lambda}). Its regularized curvature matrix is

Kλ,s(q)=−Dqwλ,s(q)=1λJΠS(s−qλ),(4)\mathsf{K}_{\lambda,s}(q)=-D_{q}w_{\lambda,s}(q)=\frac{1}{\lambda}J\Pi_{S}\Big(s-\frac{q}{\lambda}\Big), \tag{4}

Figure

Figure 1: The normal fan of a triangle feasible set. In the shaded O(ε)O(\varepsilon) neighborhood of the wall q1=q2q_1 = q_2 we show that an O(ε)O(\varepsilon) perturbation can change the decision only for cost vectors inside it, and each crossing incurs O(ε)O(\varepsilon) regret, which is the source of local quadratic behavior.

wherever the derivative (Jacobian) Dqwλ,s(q)D_q w_{\lambda,s}(q) exists. We show that as λ→0\lambda \to 0, Kλ,s⇀K0K_{\lambda,s} \rightharpoonup K_0, and therefore E[h(Q)⊤Kλ,s(Q)h(Q)]=κp(h)+O(λ)\mathbb{E}\big[h(Q)^\top K_{\lambda,s}(Q)h(Q)\big] = \kappa_p(h) + O(\lambda). We also show that our approximation is computationally efficient to estimate. We can identify the active face with one projection, after which the curvature matrix Kλ,s(q)K_{\lambda,s}(q) can be obtained by scaling the orthogonal projector onto the directions parallel to that face by 1/λ1/\lambda.

Prior work on contextual linear optimization has characterized generalization and fast regret rates using margin conditions that control predictions or costs near decision boundaries [5, 6, 7]. We build on this perspective by identifying the exact local second-order behavior of population regret. Decision-focused learning has also developed local quadratic and metric losses that emphasize decision-relevant prediction errors [8, 9], and quadratic regularization and projection have been used to construct differentiable prediction maps and losses [10, 11, 12, 13], including recent work that computes regret gradients as a projection of prediction error [14]. For LPs these constructions coincide with Kλ,sK_{\lambda,s}. We identify the object these methods approximate at the λ↓0\lambda \downarrow 0 limit in Theorem 2 as the measure K0K_0.

The contributions of this research can be summarized as follows. First, we show that although pointwise LP regret is discontinuous, population regret is locally quadratic, and derive the closed-form curvature concentrated on the optimizer walls. We then represent this curvature with K0K_0 and show that the regularized curvature Kλ,sK_{\lambda,s} converges weakly to K0K_0. Furthermore, we show how to derive this surrogate using just a single projection (see Proposition 1 in the Appendix). Finally, we use the curvature to derive a local bias-variance decomposition for generated scenarios for stochastic programs and a curvature-weighted allocation rule.

We now formalize these observations and state our main theoretical results. We assume standard regularity conditions for h(q)h(q) and p(q)p(q) and bounded perturbations h(q)h(q). We provide further details in Assumption 1 in Appendix A, along with the corresponding proofs.

1^{1} Hd−1\mathcal{H}^{d-1} is the Hausdorff measure, the (d−1)(d-1)-dimensional measure of the wall, length in 2D, area in 3D, etc.

Theorem 1 (The quadratic law and the closed form of κp\kappa_p). Suppose Assumption 1 holds and let fε(X):=Q+εh(Q)f_\varepsilon(X) := Q + \varepsilon h(Q) where ε↓0\varepsilon \downarrow 0. Then

R(fε)−RX⋆=ε22κp(h)+o(ε2).\mathcal{R}(f_{\varepsilon})-\mathcal{R}_{X}^{\star}=\frac{\varepsilon^{2}}{2}\kappa_{p}(h)+o(\varepsilon^{2}).

Equivalently,

lim⁡ε↓02(R(fε)−RX⋆)ε2=κp(h).\lim_{\varepsilon\downarrow0}\frac{2\big(\mathcal{R}(f_{\varepsilon})-\mathcal{R}_{X}^{\star}\big)}{\varepsilon^{2}}=\kappa_{p}(h).

Hence from the definition of κp\kappa_p in Eq. (1), the population curvature is supported on the codimension-one walls of the normal fan. 2^2

Because this measure is supported on a measure-zero set, we approximate it by the regularized curvature Kλ,sK_{\lambda,s} in Eq. (4). The point x=s−q/λx = s - q/\lambda projects onto some face FF of SS, and the Jacobian of a Euclidean projection onto a polytope is the orthogonal projector onto the directions along FF. A cost vector within O(λ)O(\lambda) of a wall FEF_E projects onto the edge EE, where that projector is rank one along dEd_E. So on a tube of width O(λ)O(\lambda) around each wall, Kλ,sK_{\lambda,s} is 1/λ1/\lambda times a rank-one matrix. With width O(λ)O(\lambda) times height 1/λ1/\lambda is O(1)O(1), and Kλ,sK_{\lambda,s} is a smoothed surrogate of the wall density.

Theorem 2 (Regularized curvature approximates the population curvature). Under Assumption 1, with κp(h)\kappa_p(h) defined in Eq. (1), as λ↓0\lambda \downarrow 0, Kλ,s⇀K0\mathsf{K}_{\lambda,s} \rightharpoonup K_0. Consequently,

E[h(Q)⊤Kλ,s(Q)h(Q)]=κp(h)+O(λ).\mathbb{E}\big[h(Q)^{\top}\mathsf{K}_{\lambda,s}(Q)h(Q)\big]=\kappa_{p}(h)+O(\lambda).

Thus, the regularized curvature Kλ,s\mathsf{K}_{\lambda,s} approximates the population curvature, with an approximation error that decreases proportionally to λ\lambda. Combining this result with Theorem 1 gives

R(fε)−RX⋆=ε22E[h(Q)⊤Kλ,s(Q)h(Q)]+o(ε2)+O(ε2λ).R(f_{\varepsilon})-R_{X}^{\star}=\frac{\varepsilon^{2}}{2}\mathbb{E}\big[h(Q)^{\top}K_{\lambda,s}(Q)h(Q)\big]+o(\varepsilon^{2})+O(\varepsilon^{2}\lambda).

Additionally, at the limit λ→0\lambda \to 0, only edges contribute to the population regret, with higher dimensional faces and vertices contributing nothing.

Here, we present an application of our curvature surrogate in an allocation rule for scenario generation budgets from generative models in expected-cost LPs [15, 16, 17, 18, 19]. Recent generative DFL methods use conditional generators to provide decision scenarios [20, 21]. For an expected-cost LP driven by the sample mean of M generated scenarios, the same curvature separates local regret into wall-weighted generator bias term and a 1/M Monte Carlo covariance term, giving us a decision-aware allocation rule that assigns more scenarios where generated dispersion aligns with the curvature on the LP walls. Unlike classical scenario allocation within a single stochastic program, we consider a fixed generation budget shared across a collection of contextual decision problems. This setting can occur when conditional scenario generation is computationally costly and the value of additional samples varies substantially across contexts.

Corollary 1 (Bias–variance split of local regret). For each generator kk, conditionally on XX, let C~k,1,…,C~k,Mk\widetilde{C}_{k,1},\ldots,\widetilde{C}_{k,M_k} be i.i.d. draws from a generator kk with mean μk(X)\mu_k(X) and covariance Σk(X)\Sigma_k(X), let Cˉk\bar{C}_k be their average, and let bk(X):=μk(X)−Q(X)b_k(X):=\mu_k(X)-Q(X) be the generator bias. Let ηk2=∥bk∥L2(PX)2+1/Mk\eta_k^2=\|b_k\|^2_{L^2(P_X)}+1/M_k be the joint error term. Also assume that the normalized perturbations satisfy uniform regularity conditions (see Remark 1 in Appendix) and that sup⁡kE[tr(Σk(X))]<∞\sup_k\mathbb{E}[\mathrm{tr}(\Sigma_k(X))]<\infty. Consider a sequence of generators and scenario counts for which ηk→0\eta_k\to0, then,

R(Cˉk)−RX⋆=12E[bk⊤Kλ,s(Q)bk]⏟decision−relevantbias+12MkE[tr(Kλ,s(Q)Σk)]⏟decision−relevantMonteCarlonoise+o(ηk2)+O(ληk2).R(\bar{C}_{k})-R_{X}^{\star}=\underbrace{\frac{1}{2}\mathbb{E}\big[b_{k}^{\top}\mathsf{K}_{\lambda,s}(Q)b_{k}\big]}_{decision-relevant bias}+\underbrace{\frac{1}{2M_{k}}\mathbb{E}\big[\mathrm{tr}\big(\mathsf{K}_{\lambda,s}(Q)\Sigma_{k}\big)\big]}_{decision-relevant Monte Carlo noise}+o(\eta_{k}^{2})+O(\lambda\eta_{k}^{2}).

Only the second term in Corollary 1 depends on the number of scenarios, weighting the component of the generator's conditional variance in directions normal to the decision boundary. More scenarios are allocated for generated variance that is decision-relevant, according to the curvature. We provide the construction of the generation rule in Proposition 2 and the implementation used in our experiments in Algorithm 1 in the Appendix, where one projection per context determines Kλ,sK_{\lambda,s} and scenarios are allocated proportionally to tr(Kλ,sΣ)\sqrt{\mathrm{tr}(K_{\lambda,s}\Sigma)}.

2^{2}Here codimension-one means one dimension lower than the ambient space RdR^{d}.

References (23)