arXiv:2606.16790v1 [cs.LG] 15 Jun 2026
Decision-Weighted Flow Matching for Contextual Stochastic Optimization
Jize Xie∗ Department of Industrial Engineering and Decision Analytics Hong Kong University of Science and Technology [email protected]
Haomiao Wu∗ Big Data Institute Central South University [email protected]
Qiang Chen Department of Industrial Engineering and Decision Analytics Hong Kong University of Science and Technology [email protected]
Xiu Su† Big Data Institute Central South University [email protected]
Yi Chen† Department of Industrial Engineering and Decision Analytics Hong Kong University of Science and Technology [email protected]
Abstract Conditional generative models are increasingly used as scenario generators for stochastic optimization, but standard training objectives emphasize uniform distributional fit rather than the downstream decisions induced by generated scenarios. This creates an objective mismatch: errors in statistically common regions may have little effect on regret, whereas errors in decision-sensitive regions can substantially change the optimal action. We propose Decision-Weighted Flow Matching (DW-FM), a regret-aligned training framework that preserves the simplicity of standard flow matching while reweighting its velocity-regression objective using decision-sensitive endpoint information. Theoretically, we connect downstream regret to pathwise velocity mismatch through a loss-induced decision discrepancy and an adjoint transport argument, yielding an ideal regret-aligned surrogate and practical endpoint-weighted objectives with regret guarantees. Empirically, we demonstrate the effectiveness of DW-FM on three CVaR-based contextual stochastic optimization benchmarks spanning synthetic portfolio, semi-real financial, and traffic-CVaR tasks, where DW-FM improves downstream regret over standard baselines.
1
Introduction
Conditional generative models are a natural interface between prediction and stochastic optimization. Given a context, a model generates scenarios for uncertain outcomes, and a downstream solver chooses a decision from the induced distribution. This distributional view is important in applications such as inventory control, portfolio allocation, and risk-sensitive planning, where decisions may depend on tail events or multimodal uncertainty rather than on mean prediction alone [1, 2, 3, 4]. However, in such pipelines the learned conditional law is only an intermediate object. The final objective is not distribution matching itself, but low downstream regret. ∗ Equal contribution. † Corresponding authors.
This creates an objective mismatch. Standard generative objectives allocate training effort according to distributional fit: errors are weighted by how often the corresponding regions are sampled by the training objective. Stochastic optimization weights errors differently. An error in a decision-sensitive tail region can substantially change the optimizer, while an error in a common but decision-irrelevant region may have little effect on the final decision. Thus, a scenario generator can fit the conditional distribution well on average but still make the errors that matter most for regret. While decision-focused learning addresses a related mismatch for predictive models by training them through the decisions they induce rather than through prediction loss alone [5, 6, 7, 8], much of this literature treats the learned object as a point prediction, deterministic surrogate, or differentiable optimization layer. Recent generative decision-learning methods move to generative or diffusionbased scenario generators, often combined with end-to-end decision-gradient training [3, 4]. Our focus is more targeted: given a conditional generator, can its training loss be made regret-aligned so that fitting effort is concentrated on decision-relevant regions? We study this question in the context of flow matching. Conditional flow matching trains a scenario generator by local velocity regression along interpolation paths [9]. This structure is attractive because the regression loss can be reweighted without changing the architecture, velocity labels, sampling procedure, or downstream solver. The key challenge is to choose weights that are principled for regret: downstream regret is a terminal, optimizer-level quantity, whereas flow matching is trained through local pathwise velocity errors. We propose Decision-Weighted Flow Matching (DW-FM), a regret-aligned training framework for contextual stochastic optimization. DW-FM first connects regret to an ideal adjoint-weighted pathwise velocity error, and then replaces this ideal but generally intractable weight with a computable endpoint sensitivity score. The resulting algorithm is a plug-in modification of standard conditional flow matching: it simply multiplies each per-sample FM regression loss by a decision-sensitive endpoint weight. Our theory justifies this reweighting as a regret-aligned surrogate. We show that downstream regret is controlled by a loss-induced decision discrepancy, and then use an adjoint transport argument to relate this discrepancy to weighted pathwise velocity error. Finally, we prove a regret bound that separates the trainable weighted excess risk from the bias introduced by reweighting, with a finite-sample extension. Empirically, DW-FM reduces downstream regret on synthetic portfolio, semi-real financial, and PEMS-BAY traffic-CVaR benchmarks, outperforming standard baselines in the main comparisons and improving downside-tail diagnostics. To sum up, our contributions are as follows: • We formulate decision-aligned conditional scenario generation for contextual stochastic optimization through a loss-induced decision discrepancy that directly bounds regret. • We propose Decision-Weighted Flow Matching (DW-FM), a plug-in endpoint-weighted objective for conditional flow matching that changes only the per-sample regression weights in standard FM regression. • We provide theoretical guarantees for DW-FM. We derive an ideal adjoint-weighted pathwise surrogate, characterize the population target induced by endpoint weighting, and prove a regret bound in terms of weighted excess risk and tilting bias, with a finite-sample extension. • Extensive experiments on three CVaR-based benchmarks show that DW-FM reduces downstream regret relative to Uniform FM, improves over standard predict-then-optimize and decision-learning baselines in the main comparisons, and yields better downside-tail diagnostics.
2
Related Work
Decision-Focused Learning and Stochastic Optimization. Decision-focused learning and stochastic optimization argue that predictive models should be evaluated by the decisions they induce, not only by prediction error. Classical stochastic programming provides the optimization foundation for decision-making under uncertainty [1, 10, 11], while task-based end-to-end learning and SPO/SPO+ explicitly train predictors for downstream decision quality [5, 6]. Subsequent work extends this principle to combinatorial and differentiable optimization layers [12, 7, 8, 13, 14, 15]. However, much of this line focuses on point predictions or deterministic surrogates passed to a solver. Our
setting is different: the learned object is a full conditional law used as a scenario generator. We therefore ask how regret should reshape the surrogate used to train the conditional generator itself. Conditional Generative Models for Decision Making. Generative models are increasingly used to represent conditional uncertainty through samples, including probabilistic forecasting and diffusionbased time-series models [16, 17]. Recent generative decision-learning methods bring this idea into downstream optimization: Gen-DFL uses generative modeling to capture uncertainty and improve robust decision quality, while Diffusion-DFL trains diffusion predictors for stochastic optimization using reparameterization or score-function estimators [3, 4]. These works establish the value of distributional scenario generation for decision making. Our focus is complementary: we keep the flow-matching backbone fixed and redesign the generative surrogate so that fitting effort is allocated according to downstream regret sensitivity. Flow Matching and Weighted Surrogate Design. Flow matching provides a simulation-free framework for continuous-time generative modeling by reducing training to velocity-field regression along probability paths [9]. Related interpolation-based and straight-path generative modeling frameworks include rectified flow and stochastic interpolants [18, 19, 20], while conditional and optimal-transport flow matching further improve training stability and path design for continuous normalizing flows [21]. This pathwise regression form makes flow matching a natural place to introduce decision-sensitive weighting. Related cost-sensitive and importance-weighted learning methods also reweight samples according to task relevance, class imbalance, or distribution shift [22, 23, 24, 25, 26]. In contrast to generic reweighting, DW-FM derives its weight from regret control in conditional stochastic optimization, yielding an adjoint-weighted ideal surrogate and a practical endpoint-weighted plug-in objective that changes only the per-sample FM loss.
3
Problem Formulation
We study a predict-then-optimize pipeline for contextual stochastic optimization. In the prediction stage, given an observed context x ∈ X , the learning system produces a conditional scenario generator for the uncertain quantity S ∈ S ⊆ Rd . This generator induces a conditional distribution and is accessed through generated scenarios. In the optimization stage, the induced conditional distribution is passed to a downstream stochastic optimization solver, which chooses a decision z ∈ Z ⊆ Rm to minimize expected scenario loss. Let qx⋆ denote the true conditional law of S given X = x. For any candidate probability law q on S, define the context-specific risk Rx (z; q) := ES∼q [ℓx (z, S)] . If the true law were known, the optimal decision would be z⋆x ∈ arg minz∈Z Rx (z; qx⋆ ). In practice, qx⋆ is usually unknown, but we observe an i.i.d. training dataset D = {(xi , si )}ni=1 to train a prediction model, where the pairs are independent realizations of (X, S). Conditional generative models offer a natural modeling framework for this task. By learning an expressive conditional law qθ,x , parameterized by trainable parameters θ, the model serves as a data-driven scenario generator. Given the learned generative surrogate, the downstream solver returns the plug-in decision zθ (x) ∈ arg minz∈Z Rx (z; qθ,x ). We evaluate the utility of this model by the decision regret it incurs under the true conditional law: Regx (θ) := Rx (zθ (x); qx⋆ ) − Rx (z⋆x ; qx⋆ ) . Our objective is to minimize the expected regret, E[RegX (θ)]. This criterion highlights the mismatch between ordinary distribution matching and decision quality. A generative model may approximate the true conditional distribution well in a global statistical sense while still making errors in regions that strongly affect the optimizer. We therefore need a metric that measures distributional error through the downstream loss class rather than through a generic distributional distance. Definition 3.1 (Decision discrepancy). For any probability laws q and q ′ on S, define ddec,x (q, q ′ ) := sup |Rx (z; q) − Rx (z; q ′ )| . z∈Z
Unlike generic distributional distances, ddec,x only measures discrepancies that can change downstream risks. Crucially, controlling this discrepancy is sufficient to upper-bound the regret: Proposition 3.2. For every context x and every learned law qθ,x on S, we have Regx (θ) ≤ ⋆ 2 ddec,x (qx⋆ , qθ,x ). Consequently, the expected regret satisfies E[RegX (θ)] ≤ 2 E[ddec,X (qX , qθ,X )] . Proposition 3.2 reduces the original decision problem to a surrogate-design task: construct a trainable generative objective that minimizes the decision discrepancy between qθ,x and qx⋆ .
4
Decision-Weighted Flow Matching
4.1
Flow matching for conditional generation
We use flow matching as the conditional generative backbone. The model is a parameterized vector field vθ : [0, 1] × S × X → Rd , where θ collects the trainable parameters. For each context x, let q0,x be a simple base distribution on S. Starting from S0 ∼ q0,x , the learned flow evolves according θ t to dS dt = vθ (t, St , x), for t ∈ [0, 1]. We write qx,t for the marginal law of St , and define the learned θ terminal law by qθ,x := qx,1 . Flow matching trains vθ by supervised regression. In population form, draw a data endpoint (X, S1 ), so that conditionally on X = x, the endpoint S1 follows the true conditional distribution qx⋆ . Independently draw S0 ∼ q0,X , T ∼ Unif[0, 1], and construct the linear interpolation ST = (1 − T )S0 + T S1 ,
∆ := S1 − S0 ,
Y := (T, ST , X).
Here S0 is the base sample, S1 is the data endpoint, and ∆ is the constant velocity along the straight-line path connecting them. The tuple Y is the regression input observed by the model. The standard conditional flow-matching objective is h i 2 LFM (θ) = E ∥vθ (T, ST , X) − ∆∥ . That is, at a random interpolation point (T, ST ) and context X, the model is trained to predict the velocity pointing from the base sample to the data endpoint. Thus, FM reduces conditional generation to supervised vector-field regression. However, this objective is agnostic to downstream decision. We aim to modify this loss so that it emphasizes the parts that matter most for decision making. 4.2
From Decision Discrepancy to Endpoint Weights
FM penalizes all squared velocity errors uniformly. In a predict-then-optimize pipeline, however, the relevant error is the decision discrepancy ddec,x . We therefore seek a weighting mechanism that gives larger weight to velocity errors that can induce larger changes in downstream risks. Fix a context x, and let ux (t, s) be an ideal target velocity field transporting q0,x to qx⋆ . For a fixed decision z, the terminal risk error is driven by how local velocity errors along the path perturb the terminal loss ℓx (z, ·). To express this sensitivity, define the backward transported loss ϕx,z by ∂t ϕx,z (t, s) + ux (t, s)⊤ ∇s ϕx,z (t, s) = 0,
ϕx,z (1, s) = ℓx (z, s).
(1)
Thus ϕx,z (t, s) is the terminal loss pulled back to the path location (t, s), and ∇s ϕx,z (t, s) measures how a local perturbation at that location changes the terminal risk of decision z. Therefore, a velocity error at (t, s) should receive larger training weight when this gradient is large, because the same local transport error can then induce a larger error in the downstream risk. Since ddec,x takes the worst case over downstream decisions, the corresponding ideal pathwise sensitivity envelope is 2 Mx (t, s) := supz∈Z ∥∇s ϕx,z (t, s)∥ . This envelope is the pathwise weight induced by the decision discrepancy: locations with large Mx (t, s) are precisely those where small velocity errors can produce large changes in some downstream risk. In Section 5, we show that the resulting Mx -weighted pathwise velocity error controls ddec,x , and hence regret. However, Mx is not directly trainable. We therefore propose a computable endpoint score that preserves the main decision-sensitivity signal. At terminal time, ∇s ϕx,z (1, s) = ∇s ℓx (z, s), so terminal loss gradients provide a tractable proxy for adjoint sensitivity. Moreover, rather than taking a global supremum over all decisions, we use the decision around which regret is locally determined. If 2 the oracle decision were known, this gives the oracle endpoint score wx⋆ (s) = 1 + λ ∥∇s ℓx (z⋆x , s)∥ . The constant term retains ordinary FM coverage, while λ ≥ 0 controls the strength of decisionsensitive reweighting. Since z⋆x depends on the unknown true conditional distribution, we replace it with a reference decision b zx and use the plug-in endpoint score 2
w bx (s) = 1 + λ ∥∇s ℓx (b zx , s)∥ . b zx can be obtained from a baseline predictor, or a sample-average approximation solution. The quality of this plug-in score depends on the accuracy of b zx . We precisely quantify their relationship in Appendix A.6.
4.3
Decision-Weighted Flow Matching Objective and Plug-in Decision
We now use the score w bx (s) to define the trainable method, which we call Decision-Weighted Flow Matching (DW-FM). Its population objective is LDW−FM (θ) := E[w bX (S1 )∥vθ (T, ST , X) − ∆∥2 ]. This objective preserves the standard FM regression label ∆; it only changes how much each endpoint contributes to the squared velocity-regression loss. In empirical training, DW-FM is implemented by multiplying the usual per-sample FM loss by the decision-sensitive weight of the observed endpoint, with the reference decision b zx treated as fixed. The minibatch procedure is summarized in Algorithm 1 in Appendix A. At test time, for a new context x, we generate scenarios by drawing S0,k ∼ q0,x and integrating dSt /dt = vθ (t, St , x) to obtain e s1 , . . . , e sK ∼ qθ,x . The downstream decision is then computed by PK the sample-average plug-in problem b zθ (x) ∈ arg minz∈Z K −1 k=1 ℓx (z, e sk ).
5
Theoretical Analysis
5.1
Ideal Pathwise Regret Control
We first introduce an ideal pathwise surrogate induced by the decision discrepancy. Fix a context x. At this stage, ux denotes a sufficiently regular target velocity field transporting q0,x to qx⋆ ; in Sections 5.2–5.3, we specialize this target path to the FM interpolation path. Assumption 5.1 (Path and adjoint regularity). Fix a context x. There exists a target path {µx,t }t∈[0,1] θ transporting q0,x to qx⋆ , and the learned path {qx,t }t∈[0,1] is induced by vθ (·, ·, x) with endpoints θ q0,x and qθ,x . Both paths admit densities, µx,t (ds) = ρx,t (s) ds, qx,t (ds) = ρθx,t (s) ds, which are sufficiently regular and satisfy the continuity equations driven by ux and vθ (·, ·, x), respectively. Moreover, for every z ∈ Z, the loss ℓx (z, ·) is differentiable in s, the transport equation (1) admits a solution ϕx,z with integrable gradient, and all risks and pathwise integrals used below are finite. Assumption 5.1 collects the smoothness and integrability conditions needed to differentiate transported risks and apply the adjoint identity. Assumption 5.2 (No-boundary-flux condition). Let ∂S denote the boundary of S. For every t ∈ [0, 1] and z ∈ Z, the boundary flux terms vanish: Z Z ϕx,z (t, s)ρθx,t (s)vθ (t, s, x)⊤ n(s) dA(s) = ϕx,z (t, s)ρx,t (s)ux (t, s)⊤ n(s) dA(s) = 0, ∂S
∂S
where n(s) is the outward unit normal and dA is surface measure. This condition rules out changes in transported expected loss caused by probability mass entering or leaving S through the boundary. It is standard in transport and continuous-adjoint analyses [27, 28]; for example, it holds under periodic boundaries, zero normal probability flux on compact domains, or sufficient decay on Rd . Using the ideal sensitivity envelope Mx from Section 4.2, define Z 1Z 2 θ Lideal,x (θ) := Mx (t, s) ∥vθ (t, s, x) − ux (t, s)∥ dqx,t (s) dt. 0
S
Theorem 5.3. Under Assumptions 5.1 and 5.2, for every fixed context x, ddec,x (qx⋆ , qθ,x ) ≤ Lideal,x (θ)1/2 . Consequently, E[RegX (θ)] ≤ 2 E Lideal,X (θ)1/2 . Theorem 5.3 directly shows that pathwise velocity errors weighted by Mx (t, s) control the decision discrepancy, and therefore regret. Thus Lideal,x is the ideal benchmark that motivates DW-FM. When the downstream risk is strongly convex, Appendix C gives a sharper first-order closure that replaces the square-root conversion in Theorem 5.3 by a linear regret conversion. 5.2
Population Target of the Endpoint-Weighted Objective
The ideal bound in Section 5.1 controls regret through the error between the learned field vθ and a target velocity ux . To connect this bound to DW-FM, we now specialize the target path to the FM
interpolation path. Under this choice, ux is the ordinary FM population target. DW-FM, however, optimizes an endpoint-weighted regression objective. This subsection identifies the population target selected by that objective and quantifies its deviation from ux . Fix a context x. Write Ex [·] := E[· | X = x], where (S1 , S0 , T ) follows the conditional interpolation law from Section 4.3. The ordinary FM population target is ux (Y) := Ex [∆ | Y]. Let wx : S → [0, ∞) be a fixed endpoint-weight function. This includes the oracle endpoint score wx⋆ , and, once the reference decision is fixed, the plug-in score w bx . Define the fixed-context endpoint-weighted population loss h i 2 Lw,x (v) := Ex wx (S1 ) ∥v(Y) − ∆∥ . Thus Lw,x is the conditional population version of the trainable DW-FM objective; taking wx = w bx recovers the objective in Section 4.3. Because wx (S1 ) remains random after conditioning on the regression input Y, define the effective conditional weight mw,x (Y) := Ex [wx (S1 ) | Y], and, on {mw,x (Y) > 0}, define Ex [wx (S1 )∆ | Y] uw,x (Y) := . mw,x (Y) Theorem 5.4. The function uw,x is a population minimizer of Lw,x . Moreover, for every measurable vector field v, h i 2 Lw,x (v) − Lw,x (uw,x ) = Ex mw,x (Y) ∥v(Y) − uw,x (Y)∥ . In addition, on {mw,x (Y) > 0}, uw,x (Y) − ux (Y) = Covx (wx (S1 ), ∆ | Y)/mw,x (Y), where the scalar–vector covariance is understood componentwise. Theorem 5.4 gives the key bridge from the trainable objective to the regret analysis. The excess endpoint-weighted loss controls the distance from vθ to the weighted population target uw,x , while the covariance identity quantifies the target shift from the ordinary FM velocity ux . This target shift is the tilting term that appears in the regret bound below. 5.3
Population Regret for DW-FM
We now combine Sections 5.1 and 5.2 to obtain a population regret closure for DW-FM. The ideal bound controls regret through the pathwise error between vθ and the ordinary FM target velocity ux , while the trainable DW-FM objective controls the error between vθ and the endpoint-weighted population target uw,x b . Thus the key decomposition is vθ − ux = (vθ − uw,x b ) + (uw,x b − ux ). Using the plug-in endpoint score w bx from Section 4.2, define h i 2 Ew,x Btilt,x (w) b := Ex mw,x . b (vθ ) := Lw,x b (vθ ) − Lw,x b (uw,x b ), b (Y) ∥uw,x b (Y) − ux (Y)∥ Here Ew,x b (vθ ) measures how well the learned field fits the endpoint-weighted population target, while Btilt,x (w) b measures the target shift identified in Section 5.2. To transfer the ideal regret bound to this trainable objective, we require the endpoint-weighted interpolation distribution to cover the path regions that are important under the ideal regret weight. Assumption 5.5 (Path-overlap and sensitivity coverage). Fix the vector field vθ and a context x. Let px (t, s) be the density of (T, ST ) under the conditional FM interpolation law. There exist finite constants Ax and Bx such that, for almost every (t, s) ∈ [0, 1] × S, ρθx,t (s) ≤ Ax px (t, s),
Mx (t, s) ≤ Bx mw,x b (t, s).
The first inequality is a path-overlap condition: the learned ODE path should remain covered by the FM interpolation path. The second inequality is a sensitivity-coverage condition: the endpointinduced path weight should be large on regions with high ideal decision sensitivity. Together they imply Mx (t, s)ρθx,t (s) ≤ Cw,x Cw,x := Ax Bx . b mw,x b (t, s)px (t, s), b Theorem 5.6. Under the conditions of Theorem 5.3 and Assumption 5.5, q E[RegX (θ)] ≤ 2E 2Cw,X (E (v ) + B ( w)) b . θ tilt,X b w,X b
Theorem 5.6 shows that DW-FM regret is governed by two quantities: the endpoint-weighted excess risk and the tilting bias. The former is the error controlled by the trainable objective; the latter measures the population target shift caused by endpoint weighting. Thus, expected regret is small whenever the learned field fits the endpoint-weighted population target well and the induced target shift is controlled. Setting λ = 0, DW-FM reduces to ordinary FM and the tilting bias vanishes. For λ > 0, decision weighting can redirect approximation capacity toward decision-sensitive path regions, but it also introduces a tilting term. The effect of decision weighting is therefore a bias–fit tradeoff rather than an unconditional improvement. Appendix B further illustrates the benefit of decision weighting. We also provide a corresponding finite-sample analysis in Appendix D.
6
Experiments
6.1
Experimental Setup
We evaluate DW-FM on three CVaR-based contextual stochastic optimization benchmarks: a controlled synthetic portfolio sweep, a semi-real financial portfolio task based on Ken French industry portfolios and Fama–French factors [29, 30], and a PEMS-BAY traffic congestion task [31]. These benchmarks share the same evaluation structure: given a context x, the learning method produces scenarios or predictions for an uncertain outcome vector, and the downstream solver computes a feasible decision under a mean-loss plus CVaR objective. We use downstream regret as the primary metric. The two portfolio benchmarks evaluate return-scenario generation for long-only portfolio decisions. The synthetic sweep provides a controlled test under increasing nonlinear context–return complexity, while the semi-real financial task tests the method under chronological market data and realized downside-risk evaluation. The PEMS-BAY task uses the same CVaR decision protocol for congestion outcomes, providing an additional real-data test with different outcome semantics and loss geometry. The detailed data generation process is described in Appendix E. Baselines. We compare DW-FM with four baselines. (i) Uniform FM uses the same conditional flow-matching architecture, sampling procedure, and downstream solver as DW-FM, but trains with the standard unweighted FM regression loss; this is the direct ablation for decision-sensitive reweighting. (ii) 2Stage PTO first trains a deterministic predictor using a supervised prediction loss and then passes the prediction to the same downstream optimizer [6]; this represents the classical predict-then-optimize pipeline. (iii) SPO+ trains the deterministic predictor with the standard convex decision-focused surrogate for predict-then-optimize learning [6]. (iv) Task-based E2E trains the predictor directly through the downstream task loss using the same decision objective [5]. Within each benchmark, all methods are evaluated with the same frozen task-specific CVaR regret evaluator. Table 1: Synthetic controlled portfolio sweep. Full-test and hardest-25% regret across polynomial degrees. Lower is better. Values are mean ± standard deviation over repeated runs. Split / Task
Degree
Uniform FM
2Stage PTO
SPO+
Task-based E2E
DW-FM
Full test (synthetic)
Deg-2 Deg-4 Deg-6 Deg-8
0.0745 ± 0.0008 0.0773 ± 0.0024 0.0779 ± 0.0006 0.0766 ± 0.0012
0.0774 ± 0.0008 0.0791 ± 0.0016 0.0820 ± 0.0034 0.0800 ± 0.0021
0.0912 ± 0.0007 0.0913 ± 0.0037 0.0925 ± 0.0020 0.0918 ± 0.0033
0.0871 ± 0.0022 0.0880 ± 0.0046 0.0890 ± 0.0010 0.0920 ± 0.0038
0.0726 ± 0.0016 0.0739 ± 0.0007 0.0756 ± 0.0028 0.0746 ± 0.0010
Hardest 25% (synthetic)
Deg-2 Deg-4 Deg-6 Deg-8
0.0649 ± 0.0009 0.0662 ± 0.0012 0.0647 ± 0.0005 0.0657 ± 0.0008
0.0676 ± 0.0008 0.0699 ± 0.0012 0.0692 ± 0.0018 0.0687 ± 0.0012
0.0768 ± 0.0016 0.0789 ± 0.0015 0.0764 ± 0.0030 0.0775 ± 0.0019
0.0755 ± 0.0015 0.0759 ± 0.0040 0.0753 ± 0.0023 0.0787 ± 0.0014
0.0633 ± 0.0003 0.0650 ± 0.0011 0.0638 ± 0.0012 0.0641 ± 0.0003
6.2
Experimental Results
Synthetic controlled portfolio sweep benchmark. We first evaluate DW-FM on a fully synthetic portfolio-CVaR benchmark, where the context-to-return map has polynomial degree in {2, 4, 6, 8}. This benchmark isolates decision-weighted training in a controlled setting: the downstream portfolioCVaR objective is fixed, while the conditional return model becomes increasingly nonlinear. Table 1 reports exact regret values with standard deviations, while Figure 1 visualizes the comparison across degrees and highlights improvement over Uniform FM. The hardest-25% subset is defined by a decision-sensitivity score that measures the estimated impact on the downstream decision. Across all degrees and both full-test and hardest-25% splits, DW-FM attains the lowest regret among Uniform
Figure 1: Synthetic controlled nonlinear portfolio degree sweep. (a) Full-test regret. (b) Hardest-25% regret. (c) Improvement over Uniform FM. Lower is better in (a,b); positive is better in (c). FM, 2Stage PTO, SPO+, and Task-based E2E. The comparison with Uniform FM isolates the effect of decision-sensitive reweighting, since both methods use the same conditional flow-matching backbone and downstream evaluator. The hardest-25% results show that the improvement is preserved on decision-sensitive contexts rather than being driven only by easy cases. Semi-real portfolio-CVaR benchmark. We next evaluate DW-FM on the semi-real financial portfolio-CVaR benchmark. This task uses chronological market data and tests whether decisionsensitive reweighting remains useful under realistic temporal structure. Table 2 reports two complementary views of the semi-real financial experiment. The top block gives the primary full-test decision-performance comparison under the frozen portfolio-CVaR evaluator. DW-FM reduces mean regret from 0.00655 to 0.00590 and CVaR loss from 0.01485 to 0.01452, while realized mean return remains essentially unchanged. This suggests that the improvement comes mainly from better downside risk control rather than from a return-seeking artifact. The bottom block serves a different purpose: it is a tail-fit diagnostic on the hardest 25% contexts. We use this subset to examine whether DW-FM improves the parts of the generated loss distribution most relevant to the CVaR objective. DW-FM improves worst-10% tail Wasserstein, q90 gap, and CVaR90 gap, supporting the interpretation that its regret gain is associated with better modeling of downside-tail regions. Table 2: Semi-real portfolio-CVaR decision performance and tail diagnostics. The top block reports full-test decision metrics. The bottom block reports downside-tail fit diagnostics on the predefined hardest 25% contexts, used to assess whether DW-FM better captures decision-relevant tail regions. Lower is better except mean return. Group
Metric
Uniform FM
DW-FM
Improvement
Decision performance, full test
Mean regret Std regret Mean return CVaR loss
0.00655 0.00048 0.00040 0.01485
0.00590 0.00039 0.00039 0.01452
0.00065 – – 0.00033
Tail diagnostics, hardest 25%
Tail W1 worst 10% q90 gap CVaR90 gap
0.05195 0.03191 0.05212
0.04407 0.02561 0.04377
0.00788 0.00630 0.00835
Context-level bridge on hardest 25%: Spearman(∆tail-fit, ∆regret) = 0.3211.
Semi-real portfolio-CVaR: stability, difficulty, and tuning. Figure 2 gives three diagnostics for the semi-real portfolio-CVaR benchmark. Panel (a) shows that DW-FM improves over Uniform FM in all chronological test slices, suggesting that the full-test gain is not driven by a single market period. Panel (b) stratifies contexts by difficulty and shows that the improvement is largest on the hardest contexts, where portfolio decisions are most sensitive to distributional errors. Panel (c) reports the validation sweep over λ: λ = 0 recovers Uniform FM, while positive values improve regret up to a moderate range, consistent with the bias–fit tradeoff induced by decision weighting. Semi-real portfolio-CVaR: downside-tail mechanism. Table 2 shows that DW-FM improves downside-tail diagnostics on the hardest contexts. Figure 3 further links these diagnostics to decision
b
Chronological blocks
0.0010
0.0006
0.0006
0.0005
0.0005
0.0004
λ sweep 0.0065
Validation
0.0063
0.0062
Full test
0.0060
0.0055
0.0001
0.0000
200
0.0010
0.0004
0.0003
0.0065
0.0017 largest gain
0.0015
0.0008
c
Context difficulty
0.0010
Regret
Improvement over Uniform
a
0.0000 easiest 25%
009 014 019 026 0–2 5–2 0–2 201 201 202
5–2
middle 50%
hardest 25%
0
01 0.0
02 0.0
05 0.0
1 0.0
2 0.0
λ
(a) Hardest-context regret Δ=0.0017
Regret ↓
0.0104
0.010
0.009
0.0088
0.008 Uniform FM
Practical DW-FM
(b) Tail-fit improvement 20 15
(c) Tail/regret bridge Spearman ρ = 0.321
19.7%
0.004
16.0%
15.2%
Δ regret ↑
0.011
Relative improvement (%) ↑
Figure 2: Semi-real stability, localization, and robustness. (a) Chronological slices. (b) Context difficulty. (c) Lambda sweep.
10
0.002
0.000
5 0 Tail W1 worst 10%
q90 gap
CVaR90 gap
0.005
0.010
Δ tail-fit ↑
Figure 3: Downside-risk mechanism on semi-real hardest contexts. (a) Hardest-context regret. (b) Relative improvement in downside-tail fit metrics. (c) Context-level association between tail-fit improvement and regret improvement. Positive ∆ values indicate improvement over Uniform FM.
quality: DW-FM reduces hardest-context regret, improves multiple tail-fit measures, and shows a positive context-level association between tail-fit improvement and regret improvement. These results support the interpretation that the regret gain comes from better modeling of the downside regions that drive the portfolio-CVaR optimizer. PEMS-BAY traffic-CVaR benchmark. We also evaluate DW-FM on the PEMS-BAY traffic-CVaR benchmark, which follows the same predict-generate-optimize protocol but uses congestion outcomes rather than asset returns. Table 3 reports full-test regret under the frozen traffic-CVaR evaluator. DW-FM obtains the lowest regret, reducing regret from 758.71 for Uniform FM to 729.73, and also outperforming 2Stage PTO, SPO+, and Task-based E2E. Because the outcome units and regret scale differ from the portfolio benchmarks, we interpret this comparison within the PEMS-BAY task rather than comparing absolute regret values across tasks. Table 3: PEMS-BAY traffic-CVaR benchmark. Full-test regret under the frozen traffic-CVaR evaluator. Lower is better.
Regret
Uniform FM
2Stage PTO
SPO+
Task-based E2E
DW-FM
758.71
798.51
837.09
1754.45
729.73
Summary of experimental findings. Across the three benchmarks, DW-FM improves downstream regret relative to the baselines. The synthetic sweep shows robustness across nonlinear degrees, the semi-real portfolio task links regret reduction to improved downside-tail fit, and PEMS-BAY provides an additional real-data check under a different outcome geometry. Overall, the experiments support the view that scenario generators for CSO should prioritize decision-sensitive regions rather than uniform distributional fit.
7
Conclusion
We identify and address the mismatch between uniform conditional generative training and regretdriven contextual stochastic optimization. We propose Decision-Weighted Flow Matching (DW-FM), which preserves standard flow matching while reweighting training toward decision-sensitive regions. Our theory links regret to decision discrepancy and pathwise velocity mismatch, motivating an adjoint-weighted ideal objective and practical endpoint-weighted surrogates with controlled tilting bias and regret bounds. Experiments in synthetic and real data show improved downstream regret and downside-tail behavior over standard baselines. DW-FM thus offers a principled route to training conditional generators for decision quality rather than uniform distributional fit.
References [1] Alexander Shapiro, Darinka Dentcheva, and Andrzej Ruszczyński. Lectures on Stochastic Programming: Modeling and Theory, volume 9 of MOS-SIAM Series on Optimization. Society for Industrial and Applied Mathematics and Mathematical Optimization Society, Philadelphia, PA, 2009. [2] R. Tyrrell Rockafellar and Stanislav Uryasev. Optimization of conditional value-at-risk. Journal of Risk, 2(3):21–41, 2000. [3] Prince Zizhuang Wang, Shuyi Chen, Jinhao Liang, Ferdinando Fioretto, and Shixiang Zhu. Gen-dfl: Decision-focused generative learning for robust decision making. arXiv preprint arXiv:2502.05468, 2025. [4] Zihao Zhao, Christopher Yeh, Lingkai Kong, and Kai Wang. Diffusion-dfl: Decision-focused diffusion models for stochastic optimization. arXiv preprint arXiv:2510.11590, 2025. [5] Priya L. Donti, Brandon Amos, and J. Zico Kolter. Task-based end-to-end model learning in stochastic optimization. In Advances in Neural Information Processing Systems, volume 30, 2017. [6] Adam N. Elmachtoub and Paul Grigas. Smart “predict, then optimize”. Management Science, 68(1):9–26, 2022. doi: 10.1287/mnsc.2020.3922. [7] Bryan Wilder, Bistra Dilkina, and Milind Tambe. Melding the data-decisions pipeline: Decisionfocused learning for combinatorial optimization. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 1658–1665, 2019. doi: 10.1609/aaai.v33i01.33011658. [8] Aaron Ferber, Bryan Wilder, Bistra Dilkina, and Milind Tambe. Mipaal: Mixed integer program as a layer. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 1504–1511, 2020. doi: 10.1609/aaai.v34i02.5509. [9] Yaron Lipman, Ricky T. Q. Chen, Heli Ben-Hamu, Maximilian Nickel, and Matthew Le. Flow matching for generative modeling. In International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=PqvMRDCJT9t. [10] Dimitris Bertsimas and Nathan Kallus. From predictive to prescriptive analytics. Management Science, 66(3):1025–1044, 2020. [11] Nathan Kallus and Xiaojie Mao. Stochastic optimization forests. Management Science, 69(4): 1975–1994, 2023. [12] Brandon Amos and J Zico Kolter. Optnet: Differentiable optimization as a layer in neural networks. In International conference on machine learning, pages 136–145. PMLR, 2017. [13] Akshay Agrawal, Brandon Amos, Shane Barratt, Stephen Boyd, Steven Diamond, and J. Zico Kolter. Differentiable convex optimization layers. In Advances in Neural Information Processing Systems, volume 32, 2019. [14] Quentin Berthet, Mathieu Blondel, Olivier Teboul, Marco Cuturi, Jean-Philippe Vert, and Francis Bach. Learning with differentiable pertubed optimizers. Advances in neural information processing systems, 33:9508–9519, 2020.
[15] Jayanta Mandi, James Kotary, Senne Berden, Maxime Mulamba, Victor Bucarey, Tias Guns, and Ferdinando Fioretto. Decision-focused learning: Foundations, state of the art, benchmark and future opportunities. Journal of Artificial Intelligence Research, 80:1623–1701, 2024. [16] Kashif Rasul, Calvin Seward, Ingmar Schuster, and Roland Vollgraf. Autoregressive denoising diffusion models for multivariate probabilistic time series forecasting. In International conference on machine learning, pages 8857–8868. PMLR, 2021. [17] Tijin Yan, Hongwei Zhang, Tong Zhou, Yufeng Zhan, and Yuanqing Xia. Scoregrad: Multivariate probabilistic time series forecasting with continuous energy-based generative models. arXiv preprint arXiv:2106.10121, 2021. [18] Xingchao Liu, Chengyue Gong, and Qiang Liu. Flow straight and fast: Learning to generate and transfer data with rectified flow. arXiv preprint arXiv:2209.03003, 2022. [19] Michael S Albergo and Eric Vanden-Eijnden. Building normalizing flows with stochastic interpolants. arXiv preprint arXiv:2209.15571, 2022. [20] Michael Albergo, Nicholas M Boffi, and Eric Vanden-Eijnden. Stochastic interpolants: A unifying framework for flows and diffusions. Journal of Machine Learning Research, 26(209): 1–80, 2025. [21] Alexander Tong, Kilian Fatras, Nikolay Malkin, Guillaume Huguet, Yanlei Zhang, Jarrid RectorBrooks, Guy Wolf, and Yoshua Bengio. Improving and generalizing flow-based generative models with minibatch optimal transport. In Transactions on Machine Learning Research, 2024. URL https://openreview.net/forum?id=CD9Snc73AW. [22] Charles Elkan. The foundations of cost-sensitive learning. In Proceedings of the Seventeenth International Joint Conference on Artificial Intelligence, pages 973–978, 2001. [23] Bianca Zadrozny, John Langford, and Naoki Abe. Cost-sensitive learning by cost-proportionate example weighting. In Proceedings of the Third IEEE International Conference on Data Mining, pages 435–442, 2003. doi: 10.1109/ICDM.2003.1250950. [24] Hidetoshi Shimodaira. Improving predictive inference under covariate shift by weighting the log-likelihood function. Journal of statistical planning and inference, 90(2):227–244, 2000. [25] Masashi Sugiyama, Matthias Krauledat, and Klaus-Robert Müller. Covariate shift adaptation by importance weighted cross validation. Journal of Machine Learning Research, 8(5), 2007. [26] Jonathon Byrd and Zachary Lipton. What is the effect of importance weighting in deep learning? In International conference on machine learning, pages 872–881. PMLR, 2019. [27] Filippo Santambrogio. Optimal Transport for Applied Mathematicians: Calculus of Variations, PDEs, and Modeling, volume 87. Birkhäuser, 2015. [28] Clément Cances, Thomas O Gallouët, and Gabriele Todeschi. A variational finite volume scheme for wasserstein gradient flows. Numerische Mathematik, 146(3):437–480, 2020. [29] Kenneth R. French. Ken french data library. http://mba.tuck.dartmouth.edu/pages/ faculty/ken.french/data_library.html, 2025. [30] Eugene F Fama and Kenneth R French. Common risk factors in the returns on stocks and bonds. Journal of Financial Economics, 33(1):3–56, 1993. [31] Pems-bay traffic data. https://pems.dot.ca.gov/, 2025.
A
Technical Proofs
Algorithm 1 Decision-Weighted Flow Matching (DW-FM) Require: Training data D = {(xi , si )}ni=1 ; base sampler q0,x ; reference routine Ref; weight parameter λ ≥ 0; vector field vθ . Ensure: Learned vector field vθ . 1: while not converged do 2: Sample a minibatch B ⊆ D of pairs (x, s1 ). 3: For each (x, s1 ) ∈ B, set b zx ← Ref(x) and w bx (s1 ) ← 1 + λ∥∇s ℓx (b zx , s1 )∥2 . 4: Sample s0 ∼ q0,x and t ∼ Unif[0, 1] for each pair; set st = (1 − t)s0 + ts1 and ∆ = s1 − s0 . 5: Update θ by a stochastic gradient step on X 1 2 w bx (s1 ) ∥vθ (t, st , x) − ∆∥ . |B| (x,s1 )∈B
6: end while 7: return vθ .
A.1
Proof of Proposition 3.2
Fix a context x. Recall that zθ (x) ∈ arg min Rx (z; qθ,x ) z∈Z
is the plug-in decision under the learned law, while z⋆x ∈ arg min Rx (z; qx⋆ ) z∈Z
is the population-optimal decision under the true law. Since zθ (x) minimizes Rx (·; qθ,x ), we have Rx (zθ (x); qθ,x ) ≤ Rx (z⋆x ; qθ,x ) . Therefore, Regx (θ) = Rx (zθ (x); qx⋆ ) − Rx (z⋆x ; qx⋆ ) h i h i = Rx (zθ (x); qx⋆ ) − Rx (zθ (x); qθ,x ) + Rx (zθ (x); qθ,x ) − Rx (z⋆x ; qθ,x ) h i + Rx (z⋆x ; qθ,x ) − Rx (z⋆x ; qx⋆ ) . The middle term is nonpositive by the optimality of zθ (x) under qθ,x . Hence Regx (θ) ≤ |Rx (zθ (x); qx⋆ ) − Rx (zθ (x); qθ,x )| + |Rx (z⋆x ; qθ,x ) − Rx (z⋆x ; qx⋆ )| . By the definition of ddec,x ,it follows that Regx (θ) ≤ 2 ddec,x (qx⋆ , qθ,x ). Since this bound holds for every context x, evaluating it at the random context X and taking expectations gives ⋆ E[RegX (θ)] ≤ 2 E[ddec,X (qX , qθ,X )] . □ A.2
Proof of Proposition A.1
Proposition A.1. Under Assumptions 5.1 and 5.2, for every fixed decision z ∈ Z, Z 1Z θ Eqθ,x [ℓx (z, S)] − Eqx⋆ [ℓx (z, S)] = ⟨∇s ϕx,z (t, s), vθ (t, s, x) − ux (t, s)⟩ dqx,t (s) dt. 0
S
Proof. Fix a context x and a decision z ∈ Z. Let {µx,t }t∈[0,1] denote the target path in Assumpθ tion 5.1, so that µx,0 = q0,x and µx,1 = qx⋆ . Since the learned path qx,t is absolutely continuous, θ θ write qx,t (ds) = ρx,t (s)ds. Define Z Z θ Iz (t) := ϕx,z (t, s) dqx,t (s) = ϕx,z (t, s)ρθx,t (s) ds. S
S
Differentiating in time and using the continuity equation ∂t ρθx,t + ∇s · (ρθx,t vθ ) = 0, we obtain Z Z d Iz (t) = ∂t ϕx,z (t, s)ρθx,t (s) ds − ϕx,z (t, s)∇s · ρθx,t (s)vθ (t, s, x) ds. dt S S By integration by parts and the no-boundary-flux condition for the learned path, Z Z θ − ϕx,z (t, s)∇s · ρx,t (s)vθ (t, s, x) ds = ⟨∇s ϕx,z (t, s), vθ (t, s, x)⟩ ρθx,t (s) ds. S
S
Moreover, the backward transport equation (1) gives ∂t ϕx,z (t, s) = − ⟨ux (t, s), ∇s ϕx,z (t, s)⟩ . Combining the last two displays, Z d θ Iz (t) = ⟨∇s ϕx,z (t, s), vθ (t, s, x) − ux (t, s)⟩ dqx,t (s). dt S Integrating over t ∈ [0, 1] yields Z 1Z θ Iz (1) − Iz (0) = ⟨∇s ϕx,z (t, s), vθ (t, s, x) − ux (t, s)⟩ dqx,t (s) dt. 0
S
θ At terminal time, ϕx,z (1, s) = ℓx (z, s) and qx,1 = qθ,x . Hence
Iz (1) = Eqθ,x [ℓx (z, S)] . It remains to identify Iz (0). Define the analogous transported quantity along the target path: Z Jz (t) := ϕx,z (t, s) dµx,t (s). S
Using the continuity equation for µx,t , the same integration by parts argument, and the no-boundaryflux condition for the target path gives d Jz (t) = 0. dt Therefore Jz (0) = Jz (1). Since µx,1 = qx⋆ , Jz (1) = Eqx⋆ [ℓx (z, S)] . θ Since the learned and target paths share the same initial distribution, qx,0 = µx,0 = q0,x , we also have Z Z θ ϕx,z (0, s) dqx,0 (s) =
Iz (0) = S
ϕx,z (0, s) dµx,0 (s) = Jz (0). S
Combining the last two displays gives Iz (0) = Eqx⋆ [ℓx (z, S)] . Substituting the endpoint identities for Iz (1) and Iz (0) into the integrated identity proves the proposition. □
A.3
Proof of Theorem 5.3
Fix a context x and a decision z ∈ Z. By Proposition A.1, Z 1Z θ Eqθ,x [ℓx (z, S)] − Eqx⋆ [ℓx (z, S)] = ⟨∇s ϕx,z (t, s), vθ (t, s, x) − ux (t, s)⟩ dqx,t (s) dt. S
0
Taking absolute values and applying the Cauchy–Schwarz inequality with respect to the probability θ measure dqx,t (s) dt, we obtain Eqθ,x [ℓx (z, S)] − Eqx⋆ [ℓx (z, S)] Z 1Z θ ≤ ∥∇s ϕx,z (t, s)∥ ∥vθ (t, s, x) − ux (t, s)∥ dqx,t (s) dt S
0
Z 1 Z ≤ 0
1/2 Z 1 Z 1/2 2 2 θ θ ∥∇s ϕx,z (t, s)∥ ∥vθ (t, s, x) − ux (t, s)∥ dqx,t (s) dt dqx,t (s) dt .
S
0
S
θ Since qx,t is a probability law on S for every t ∈ [0, 1],
Z 1Z
θ dqx,t (s) dt =
S
0
Z 1 1 dt = 1. 0
Moreover, by the definition of the envelope 2
Mx (t, s) := sup ∥∇s ϕx,z (t, s)∥ , z∈Z
we have
2
∥∇s ϕx,z (t, s)∥ ≤ Mx (t, s). Therefore, Z 1 Z Eqθ,x [ℓx (z, S)] − Eqx⋆ [ℓx (z, S)] ≤
2
Mx (t, s) ∥vθ (t, s, x) − ux (t, s)∥ 0
1/2
θ dqx,t (s) dt
S
= Lideal,x (θ)1/2 . Since this bound holds for every z ∈ Z, taking the supremum over z yields ddec,x (qx⋆ , qθ,x ) ≤ Lideal,x (θ)1/2 . The regret bound then follows from Proposition 3.2: Regx (θ) ≤ 2 ddec,x (qx⋆ , qθ,x ) ≤ 2 Lideal,x (θ)1/2 . Finally, evaluating at the random context X and taking expectations gives h i E[RegX (θ)] ≤ 2 E Lideal,X (θ)1/2 . □
This completes the proof. A.4
Proof of Theorem 5.4
First fix a regression input value Y = y such that mw,x (y) > 0. To simplify notation inside the proof, write m(y) := mw,x (y) = Ex [wx (S1 ) | Y = y] , and Ex [wx (S1 )∆ | Y = y] uw (y) := uw,x (y) = . m(y) For any measurable vector field v, define a := v(y) − uw (y), Then
2
b := uw (y) − ∆. 2
∥v(y) − ∆∥ = ∥a + b∥ = ∥a∥2 + 2⟨a, b⟩ + ∥b∥2 .
Multiplying by wx (S1 ) and conditioning on Y = y gives h i 2 Ex wx (S1 ) ∥v(y) − ∆∥ | Y = y 2
= m(y) ∥v(y) − uw (y)∥ + 2 ⟨v(y) − uw (y), Ex [wx (S1 )b | Y = y]⟩ h i 2 + Ex wx (S1 ) ∥uw (y) − ∆∥ | Y = y . Note that Ex [wx (S1 )b | Y = y] = uw (y)Ex [wx (S1 ) | Y = y] − Ex [wx (S1 )∆ | Y = y] = m(y)uw (y) − m(y)uw (y) = 0. Therefore, h i 2 2 Ex wx (S1 ) ∥v(y) − ∆∥ | Y = y = m(y) ∥v(y) − uw (y)∥ + C(y), where
h i 2 C(y) := Ex wx (S1 ) ∥uw (y) − ∆∥ | Y = y
does not depend on v(y). Since m(y) > 0, the conditional risk is minimized uniquely at v(y) = uw (y). On the set where mw,x (Y) = 0, the conditional weighted loss is zero for every choice of v(Y), because wx (S1 ) ≥ 0 and Ex [wx (S1 ) | Y] = 0 imply wx (S1 ) = 0 conditionally almost surely. Hence the value of uw,x on this set is irrelevant. Averaging the conditional decomposition over Y also gives the stronger identity h i 2 Lw,x (v) − Lw,x (uw,x ) = Ex mw,x (Y) ∥v(Y) − uw,x (Y)∥ .
(2)
Therefore any population minimizer of Lw,x agrees with uw,x almost surely under the conditional distribution of Y given X = x on {mw,x (Y) > 0}, and any vector field with this property is a population minimizer. It remains to prove the covariance identity. By definition, ux (Y) = Ex [∆ | Y] . On {mw,x (Y) > 0}, Ex [wx (S1 )∆ | Y] − Ex [∆ | Y] Ex [wx (S1 ) | Y] Ex [wx (S1 )∆ | Y] − Ex [wx (S1 ) | Y] Ex [∆ | Y] = mw,x (Y) Covx (wx (S1 ), ∆ | Y) = . mw,x (Y)
uw,x (Y) − ux (Y) =
□
This proves the theorem. A.5
Proof of Theorem 5.6
Fix a context x. For notational simplicity, write Cw,x := Ax Bx . By Assumption 5.5, b Mx (t, s)ρθx,t (s) ≤ Cw,x b mw,x b (t, s)px (t, s) for almost every (t, s). Therefore, Z 1Z 2 θ Lideal,x (θ) = Mx (t, s) ∥vθ (t, s, x) − ux (t, s)∥ dqx,t (s) dt 0
S
Z 1Z ≤ Cw,x b
0
S
2
mw,x b (t, s) ∥vθ (t, s, x) − ux (t, s)∥ px (t, s) ds dt.
Here mw,x b (t, s) and uw,x b (t, s) abbreviate the corresponding quantities evaluated at Y = (t, s, x). Write a(t, s) := vθ (t, s, x) − uw,x b (t, s),
Then
b(t, s) := uw,x b (t, s) − ux (t, s).
2
∥vθ (t, s, x) − ux (t, s)∥ = ∥a(t, s) + b(t, s)∥2 ≤ 2∥a(t, s)∥2 + 2∥b(t, s)∥2 .
Therefore, Z 1Z Lideal,x (θ) ≤ 2Cw,x b
2
mw,x b (t, s) ∥vθ (t, s, x) − uw,x b (t, s)∥ px (t, s) ds dt
S Z 1Z
0
+ 2Cw,x b
0
S
2
mw,x b (t, s) ∥uw,x b (t, s) − ux (t, s)∥ px (t, s) ds dt.
By the weighted least-squares identity (2) established in the proof of Theorem 5.4, Z 1Z 2 mw,x b (t, s) ∥vθ (t, s, x) − uw,x b (t, s)∥ px (t, s) ds dt = Ew,x b (vθ ), 0
S
while the second integral is exactly Btilt,x (w). b Hence Lideal,x (θ) ≤ 2Cw,x b . b (Ew,x b (vθ ) + Btilt,x (w)) The pointwise regret bound from Theorem 5.3 gives q b Regx (θ) ≤ 2Lideal,x (θ)1/2 ≤ 2 2Cw,x b (Ew,x b (vθ ) + Btilt,x (w)).
(3)
Averaging over X yields the expected-regret bound. □ A.6
Stability of the Plug-in Endpoint Score
This appendix quantifies the error incurred when the oracle decision z⋆x in the endpoint score is replaced by the reference decision b zx . Recall that 2
2
wx⋆ (s) = 1 + λ ∥∇s ℓx (z⋆x , s)∥ , w bx (s) = 1 + λ ∥∇s ℓx (b zx , s)∥ . Lemma A.2. Fix a context x. Suppose there exist constants Lx < ∞ and Gx < ∞ such that, for all relevant s ∈ S and all relevant decisions z, z′ ∈ Z, ∥∇s ℓx (z, s) − ∇s ℓx (z′ , s)∥ ≤ Lx ∥z − z′ ∥, and ∥∇s ℓx (z⋆x , s)∥ ≤ Gx . If ∥b zx − z⋆x ∥ ≤ εx , then sup |w bx (s) − wx⋆ (s)| ≤ λ 2Gx Lx εx + L2x ε2x . s∈S
Proof. Fix s ∈ S and write a := ∇s ℓx (b zx , s), Then
b := ∇s ℓx (z⋆x , s).
|w bx (s) − wx⋆ (s)| = λ ∥a∥2 − ∥b∥2 .
Using
∥a∥2 − ∥b∥2 ≤ ∥a − b∥ (∥a∥ + ∥b∥) ,
the Lipschitz condition gives ∥a − b∥ ≤ Lx ∥b zx − z⋆x ∥ ≤ Lx εx . Moreover, ∥a∥ ≤ ∥b∥ + ∥a − b∥ ≤ Gx + Lx εx ,
∥b∥ ≤ Gx .
Therefore,
|w bx (s) − wx⋆ (s)| ≤ λLx εx (2Gx + Lx εx ) , which is the desired bound. Taking the supremum over s completes the proof. Lemma A.2 shows that the plug-in endpoint score converges to the oracle endpoint score as the reference decision improves. In particular, for fixed λ, the score error is first order in ∥b zx − z⋆x ∥ when the reference decision error is small.
B
When Can Decision Weighting Improve over Ordinary FM
Section 5 shows that endpoint weighting changes the population target of the FM regression problem. This appendix explains when such a change can be beneficial. The point is not that weighting improves a fully realizable regression problem. If the vector-field class can represent the target velocity exactly, then ordinary FM and weighted FM can both attain zero approximation error. The benefit appears when the vector-field class has limited capacity and cannot fit all path regions equally well. In this regime, ordinary FM weights errors according to how frequently path locations are sampled by the training interpolation distribution. As a result, it can prefer a model that fits high-probability path regions even if those regions have little downstream decision impact. A decision-weighted objective can improve over ordinary FM when decision-critical regions are underweighted by the ordinary path measure and the decision-sensitive weight assigns sufficiently larger relative weight to those regions. We now formalize this mechanism in a fixed-context path-space notation. Fix a context x, and let Ω := [0, 1] × S be the path-location space. A point in this space is written as (t, s), representing an interpolation time and an interpolation state. Let νx denote the ordinary FM path measure, namely the conditional law of (T, ST ) given X = x under the standard interpolation sampling scheme. Equivalently, if P denotes the population law of the full FM regression tuple (Y, ∆, S1 ),
Y = (T, ST , X),
then νx is the conditional marginal of P on (T, ST ) given X = x. Thus, for any measurable function g on Ω, Z g(t, s) dνx (t, s) = E[g(T, ST ) | X = x] . Ω
In particular, for a path region A ⊆ Ω, νx (A) is the probability that ordinary FM samples a regression point from A. For a target velocity ux , define the ordinary FM approximation risk Z 2 ν LFM,x (v) := ∥v(t, s, x) − ux (t, s)∥ dνx (t, s). Ω
For a nonnegative path-space weight αx , define the corresponding weighted approximation risk Z 2 Lνα,x (v) := αx (t, s) ∥v(t, s, x) − ux (t, s)∥ dνx (t, s). Ω
The generic weight αx is an analytical device that describes how much emphasis a weighted surrogate places on each path location. We use a generic αx , rather than committing to a particular weight, because the purpose of this example is only to isolate the approximation-allocation mechanism: under misspecification, any path-level weight that sufficiently emphasizes decision-critical regions can change which model is selected. The ideal adjoint weight Mx and the endpoint-induced effective weight mw,x b should be viewed as two possible instantiations of this generic path-space weighting principle. Theorem B.1. For every ε ∈ (0, 1/2), there exist a two-region path space Ω = A ∪ B with ν(A) = ε,
ν(B) = 1 − ε,
a target velocity u, an ideal decision weight M , and a two-element model class V = {vgood , vbad } such that: 1. ordinary unweighted FM risk selects vbad ; 2. the ideal decision-weighted risk selects vgood ; and 3. the ideal weighted-risk gap satisfies Lνα,x (vbad ) 1 ≥ 2. ν Lα,x (vgood ) 2ε
Hence the gap between the model selected by ordinary FM and the model selected by decisionweighted FM can be made arbitrarily large as ε ↓ 0. Proof. Let A and B be disjoint path regions with νx (A) = ε,
νx (B) = 1 − ε,
ε ∈ (0, 1/2).
Region A should be interpreted as low-probability under the ordinary FM path measure but decisioncritical, while region B is high-probability but less decision-sensitive. Construct a two-element model class whose squared pathwise errors satisfy ( 0, (t, s) ∈ A, 2 ∥vgood (t, s, x) − ux (t, s)∥ = 2ε, (t, s) ∈ B, and 2
∥vbad (t, s, x) − ux (t, s)∥ =
( 1,
(t, s) ∈ A,
0,
(t, s) ∈ B.
This construction can be realized, for example, with scalar velocities by taking ux = 0 and choosing piecewise constant candidate fields with the displayed squared errors. The ordinary FM approximation risks are LνFM,x (vgood ) = 0 · ε + 2ε(1 − ε), LνFM,x (vbad ) = 1 · ε + 0 · (1 − ε) = ε. Since ε < 1/2, we have ε < 2ε(1 − ε). Therefore ordinary FM selects vbad . Now consider the weighted approximation risk. Since αx = αA on A and αx = αB on B, Lνα,x (vgood ) = αA · 0 · ε + αB · 2ε(1 − ε) = 2αB ε(1 − ε), Lνα,x (vbad ) = αA · 1 · ε + αB · 0 · (1 − ε) = αA ε. The weighted objective selects vgood whenever 2αB ε(1 − ε) < αA ε, which is equivalent to
αA > 2(1 − ε). αB
Finally, if αA /αB = ε−2 , then Lνα,x (vbad ) αA ε αA 1 1 = = = 2 ≥ 2. ν Lα,x (vgood ) 2αB ε(1 − ε) 2αB (1 − ε) 2ε (1 − ε) 2ε This proves the theorem. Theorem B.1 should be read as an approximation-allocation result, not as an unconditional guarantee that every decision weight improves over ordinary FM. It identifies a regime in which weighting can help: the model class is misspecified, the ordinary FM path measure assigns small mass to a decision-critical region, and the path-level weight assigns that region sufficiently larger relative weight. For DW-FM, the relevant path-level weight is mw,x b . Therefore practical endpoint weighting benefits from this mechanism when the endpoint proxy induces a path weight that is aligned with decision-critical regions and when the tilting bias remains controlled. Thus decision weighting does not make the vector-field class more expressive. Rather, under misspecification, it changes how limited approximation capacity is allocated across the transport path. Ordinary FM allocates capacity according to path-sampling frequency, while decision-weighted FM can allocate capacity according to downstream decision relevance when the induced path weight is well aligned with regret-sensitive regions.
C
Improved Regret for Strongly Convex Downstream Problems
The regret analysis in Section 5 controls a uniform decision discrepancy over the entire decision class. This route is deliberately general as it protects against terminal risk errors for all decisions z ∈ Z. However, this uniform-discrepancy route can be conservative in some scenarios. In this section, we consider the case that the downstream risk is smooth and strongly convex in the decision variable and propose a sharper curvature-based refinement on the regret bound. We first state the following required conditions. Assumption C.1 (Downstream curvature and unconstrained optimality). Fix a context x and suppose Z = Rm . The true risk Rx (·; qx⋆ ) is differentiable and Lz,x -smooth. The learned-law risk Rx (·; qθ,x ) is differentiable and µx -strongly convex, and admits a minimizer zθ (x) ∈ arg min Rx (z; qθ,x ). z∈Rm
Moreover, the population optimizer z⋆x ∈ arg min Rx (z; qx⋆ ) z∈Rm
is an unconstrained minimizer. Assumption C.1 is a local curvature condition on the downstream optimization problem. The smoothness of Rx (·; qx⋆ ) says that, under the true law, regret grows at most quadratically with the distance from the population optimizer z⋆x . The strong convexity of Rx (·; qθ,x ) says that, under the learned law, a small violation of the first-order optimality condition implies that the plug-in optimizer zθ (x) must be close to z⋆x . This condition holds in many regularized stochastic optimization problems. The unconstrained assumption Z = Rm is used to write the optimality conditions as ordinary gradient equalities, ∇z Rx (zθ (x); qθ,x ) = 0, ∇z Rx (z⋆x ; qx⋆ ) = 0. ⋆ Assumption C.2 (Gradient interchange). For q = qx and q = qθ,x , differentiation can be interchanged with integration: ∇z Rx (z; q) = ES∼q [∇z ℓx (z, S)] . Assumption C.2 is a regularity condition ensuring that the first-order condition of the downstream risk can be written as an expectation of sample-level gradients. It holds, for example, under standard dominated-convergence conditions on ∇z ℓx (z, S). Assumption C.3 (First-order adjoint regularity). The vector-valued terminal function s 7→ ∇z ℓx (z⋆x , s) ∈ Rm admits a sufficiently regular backward-transport solution ψx (t, s) ∈ Rm satisfying ∂t ψx (t, s) + ∇s ψx (t, s) ux (t, s) = 0, ψx (1, s) = ∇z ℓx (z⋆x , s). (4) Moreover, the same integrability and differentiability conditions required in Proposition A.1 hold for each coordinate of ψx , and the same no-boundary-flux condition as in Assumption 5.2 holds for each coordinate of ψx along both the ideal and learned paths. Assumption C.3 is the first-order analogue of the scalar adjoint regularity used in the main pathwise regret analysis. In Section 4, the scalar adjoint ϕx,z transports the terminal loss ℓx (z, s) backward along the ideal flow. Here, because downstream strong convexity lets us control regret through the first-order optimality condition at z⋆x , we instead transport the terminal gradient ∇z ℓx (z⋆x , s) backward along the same ideal flow. The resulting adjoint is ψx . The role of ψx is to convert the terminal first-order residual gθ = Eqθ,x [∇z ℓx (z⋆x , S)] − Eqx⋆ [∇z ℓx (z⋆x , S)] into a pathwise velocity-error quantity. Under Assumption C.3, applying the adjoint identity coordinate by coordinate yields Z 1Z θ gθ = ∇s ψx (t, s) (vθ (t, s, x) − ux (t, s)) qx,t (s) ds dt. 0
S
Thus ψx is introduced to connect the first-order regret control to the flow-matching pathwise velocity error. Based on the above conditions, we can obtain the following theorem.
Theorem C.4. Under Assumptions C.1, C.2, and C.3, the following two bounds hold: Regx (θ) ≤ and Lz,x Regx (θ) ≤ 2µ2x
Lz,x 2 Eqθ,x [∇z ℓx (z⋆x , S)] − Eqx⋆ [∇z ℓx (z⋆x , S)] , 2µ2x
Z 1Z 0
S
2
(5)
2
θ ∥∇s ψx (t, s)∥F ∥vθ (t, s, x) − ux (t, s)∥ qx,t (s) ds dt.
Theorem C.4 should be interpreted as a curvature-based sharpening of Theorem 5.3. The main improvement is in how pathwise velocity error is converted into regret. The general bound in Theorem 5.3 controls regret through the square root of a weighted squared velocity error. In contrast, Theorem C.4 uses downstream strong convexity to control regret linearly by a first-order weighted squared velocity error. Thus the improvement comes from replacing a square-root regret conversion with a linear one. To illustrate the difference, suppose the relevant weighted squared velocity error √ is of order ε. The general uniform-discrepancy bound gives a regret bound of order ε. In the first-order strong-convexity bound, the regret bound is of order ε. The refinement is also more local in the decision variable. In the general theorem, the envelope Mx (t, s) must protect against terminal loss errors for all feasible decisions z ∈ Z. In the first-order 2 theorem, the weight ∥∇s ψx (t, s)∥F measures the pathwise sensitivity of the first-order optimality ⋆ condition at the single decision zx . Hence the first-order refinement replaces a global worst-case sensitivity over the whole decision class with a local sensitivity of the optimality condition at the population optimizer. Proof. Let
gθ := Eqθ,x [∇z ℓx (z⋆x , S)] − Eqx⋆ [∇z ℓx (z⋆x , S)] .
By Assumption C.1, z⋆x is an unconstrained minimizer of Rx (·; qx⋆ ), so ∇z Rx (z⋆x ; qx⋆ ) = 0. By Assumption C.2,
gθ = ∇z Rx (z⋆x ; qθ,x ).
Let zθ := zθ (x). Since Rx (·; qθ,x ) is differentiable and µx -strongly convex, its gradient is µx strongly monotone. Therefore, 2
⟨∇z Rx (zθ ; qθ,x ) − ∇z Rx (z⋆x ; qθ,x ), zθ − z⋆x ⟩ ≥ µx ∥zθ − z⋆x ∥ . By Cauchy–Schwarz, ∥∇z Rx (zθ ; qθ,x ) − ∇z Rx (z⋆x ; qθ,x )∥ ≥ µx ∥zθ − z⋆x ∥ . By Assumption C.1, zθ minimizes Rx (·; qθ,x ) over Rm , so ∇z Rx (zθ ; qθ,x ) = 0. It follows that
µx ∥zθ − z⋆x ∥ ≤ ∥gθ ∥ .
Next, by Lz,x -smoothness of Rx (·; qx⋆ ) and first-order optimality of z⋆x , Rx (zθ ; qx⋆ ) − Rx (z⋆x ; qx⋆ ) ≤
Lz,x 2 ∥zθ − z⋆x ∥ . 2
Combining the last two displays yields Regx (θ) ≤
Lz,x 2 ∥gθ ∥ , 2µ2x
which proves (5). It remains to express gθ as a pathwise velocity error. By Assumption C.3, we may apply Proposition A.1 componentwise to the vector-valued terminal function s 7→ ∇z ℓx (z⋆x , s) ∈ Rm .
This gives Z 1Z gθ = 0
θ ∇s ψx (t, s) (vθ (t, s, x) − ux (t, s)) qx,t (s) ds dt,
S
where ∇s ψx (t, s) is the m × d Jacobian matrix. Hence Z 1Z θ ∥∇s ψx (t, s)∥F ∥vθ (t, s, x) − ux (t, s)∥ qx,t (s) ds dt ∥gθ ∥ ≤ S
0
Z 1 Z ≤ 0
S
2 2 θ ∥∇s ψx (t, s)∥F ∥vθ (t, s, x) − ux (t, s)∥ qx,t (s) ds dt
1/2 ,
θ where the final step uses Cauchy–Schwarz with respect to the probability measure qx,t (s) ds dt on [0, 1] × S. Substituting this bound into (5) completes the proof.
This refinement is not needed for the general validity of DW-FM. Its role is to show that the O(n−1/4 )type rate obtained from the general uniform-discrepancy route is not intrinsic to all downstream stochastic optimization problems. Under downstream strong convexity, the regret closure itself can be sharper; a finite-sample analysis that controls the corresponding first-order pathwise surrogate may yield faster regret rates.
D
Finite-Sample Analysis for Empirical DW-FM
Theorem 5.6 is a population closure for any fixed parameter θ. We now apply it to the empirical DW-FM estimator trained from the contextual dataset D = {(xi , si )}ni=1 . Throughout this appendix, E[·] without a subscript denotes full expectation over all random elements b appearing in the corresponding quantity. In particular, for the final regret bound, E[RegX (θ)] averages over the training sample, the interpolation randomness used in empirical FM training, any randomization in the reference routine or optimizer, and an independent test context X. Whenever only part of the randomness is averaged out, we use an explicit subscript. The analysis treats w b as fixed relative to the empirical FM tuples used to optimize θ. This is immediate when the reference decision rule is fixed in advance or estimated from an independent pilot sample. If the same sample is used both to construct w b and to train the vector field, the bound should be read as applying after sample splitting or cross-fitting. All population quantities involving w b in this appendix are understood conditionally on the realized weight rule. Starting from the observed training data D = {(xi , si )}ni=1 , the FM training procedure constructs one regression tuple from each data pair as follows. For each i, draw s0,i ∼ q0,xi and ti ∼ Unif[0, 1], independently, and set sti ,i = (1 − ti )s0,i + ti si , ∆i = si − s0,i , Yi = (ti , sti ,i , xi ). Here si is the observed endpoint, corresponding to S1 in the population notation. Let V := {vθ : θ ∈ Θ} be the vector-field class. The empirical DW-FM objective is n 1X 2 b w,n L w bx (si ) ∥vθ (Yi ) − ∆i ∥ . b (θ) := n i=1 i Let θb be the parameter returned by empirical DW-FM training, assumed to be an η-approximate minimizer: b b w,n b b (θ) + η. L b (θ) ≤ inf Lw,n θ∈Θ
Thus vθb is the learned vector field. Recall that Ew,x b (v) = Lw,x b (v) − Lw,x b (uw,x b ). Its test-context average, conditional on the training procedure, is Ēwb (v) := EX [Ew,X b (v) | An ] , where An denotes the sigma-field generated by the training procedure, the reference-decision routine, and any optimization randomness. When v = vθb, this is the population excess risk of the trained field, averaged over a fresh test context while holding the learned model fixed.
Assumption D.1 (Bounded empirical DW-FM losses). There exist constants W, D < ∞ such that 0≤w bX (S1 ) ≤ W,
∥v(Y) − ∆∥ ≤ D
for all v ∈ V,
almost surely under the joint interpolation law of (X, S1 , S0 , T ) and the randomness of the reference rule, if any. Assumption D.1 is a bounded-loss condition for the weighted velocity-regression problem. The upper bound on w bX (S1 ) prevents a small number of high-sensitivity endpoints from dominating the empirical objective, while the bound on ∥v(Y) − ∆∥ ensures that the weighted squared losses are uniformly bounded by W D2 . This condition is mainly used to justify the uniform-convergence step for the empirical DW-FM objective. It can be satisfied, for example, when the scenario space is compact, the base distribution is truncated or has bounded support, the vector-field class is normcontrolled, and the loss gradients used to construct w b are bounded. Define the joint plug-in weighted loss class n o 2 Fwb := (Y, ∆, S1 ) 7→ w bX (S1 ) ∥v(Y) − ∆∥ : v ∈ V , where X is the context component of Y. Let Rn (Fwb ) denote the full expected Rademacher complexity " " ## n 1X 2 Rn (Fwb ) := E Eσ sup σi w bXi (S1,i ) ∥v(Yi ) − ∆i ∥ , v∈V n i=1 where σ1 , . . . , σn are independent Rademacher signs. Theorem D.2. Under Assumption D.1, E Ēwb (vθb) ≤ E inf Ēwb (vθ ) + 4Rn (Fwb ) + η. θ∈Θ
Proof. Let Pfm w b be the population interpolation distribution of (Y, ∆, S1 ) associated with the fixed weight rule w, b and let Pfm n be the empirical measure induced by the training tuples. For each θ ∈ Θ, define 2 fθ (Y, ∆, S1 ) := w bX (S1 ) ∥vθ (Y) − ∆∥ . By Assumption D.1, each fθ takes values in [0, W D2 ]. For any realization of the training procedure, fm fm fm Pfm w b fθb ≤ Pn fθb + sup Pw b fθ − Pn fθ θ∈Θ
fm fm ≤ inf Pfm n fθ + η + sup Pw b fθ − Pn fθ θ∈Θ
θ∈Θ
fm fm ≤ inf Pfm w b fθ + η + 2 sup Pw b fθ − Pn fθ . θ∈Θ
θ∈Θ
Taking full expectation and applying the standard expected Rademacher uniform-deviation bound conditionally on the realized weight rule gives fm fm E sup Pwb fθ − Pn fθ ≤ 2Rn (Fwb ). θ∈Θ
Therefore, fm E Pfm f ≤ E inf P f b ). w b θb w b θ + η + 4Rn (Fw θ∈Θ
Finally, Pfm b (vθ ) | An ] . w b fθ = EX [Lw,X Subtracting the context-averaged population constant EX [Lw,X b (uw,X b ) | An ] , which does not depend on θ, yields the stated bound.
We next control the averaged tilting bias. Define B̄tilt (w) b := EX [Btilt,X (w) b | An ] . This is a population bias induced by endpoint weighting, not a sampling error. Write w bX (s) = 1 + λb gX (s),
2
gbX (s) := ∥∇s ℓX (b zX , s)∥ .
Assumption D.3 (Bounded conditional covariance for tilting). There exists Ctilt < ∞ such that h i 2 E ∥Cov(b gX (S1 ), ∆ | Y, An )∥ ≤ Ctilt . Assumption D.3 controls the amount by which endpoint weighting changes the population FM target. It does not require the tilting bias to vanish; it only requires the source of tilting to have a finite second moment. Intuitively, the assumption rules out cases in which the decision-sensitive weights are extremely correlated with rare, very large velocity labels after conditioning on the interpolation point. It is mild when the loss-gradient scores and interpolation velocities are bounded, and it also holds under standard moment assumptions ensuring that this conditional covariance is square integrable. Proposition D.4. Under Assumption D.3, E B̄tilt (w) b ≤ λ2 Ctilt . Proof. By Theorem 5.4, applied conditionally on the training procedure, uw,X b (Y) − uX (Y) =
Cov(w bX (S1 ), ∆ | Y, An ) . mw,X b (Y)
Substituting this identity into the definition of Btilt,X (w) b and then taking full expectation gives " # 2 ∥Cov(w bX (S1 ), ∆ | Y, An )∥ E B̄tilt (w) b =E . mw,X b (Y) Since w bX = 1 + λb gX , Cov(w bX (S1 ), ∆ | Y, An ) = λ Cov(b gX (S1 ), ∆ | Y, An ) . Moreover, mw,X b (Y) ≥ 1. Hence h i 2 E B̄tilt (w) b ≤ λ2 E ∥Cov(b gX (S1 ), ∆ | Y, An )∥ ≤ λ2 Ctilt .
We now combine the excess-risk and tilting-bias controls. To pass from the pointwise closure in the main text to a full expected-regret bound, we use the following uniform version of the coverage condition. Assumption D.5 (Uniform coverage constant). There exists a deterministic constant C̄wb < ∞ such that, almost surely over the training procedure and for almost every context x, Assumption 5.5 holds at θ = θb with constants Ax and Bx satisfying Ax Bx ≤ C̄wb . Assumption D.5 is the empirical counterpart of Assumption 5.5: it requires the product of the path-overlap and sensitivity-coverage constants to be uniformly bounded for the learned field vθb. Corollary D.6. Under Assumptions D.1, D.3, and D.5, s h i 2 b E RegX (θ) ≤ 2 2C̄wb E inf Ēwb (vθ ) + 4Rn (Fwb ) + η + λ Ctilt . θ∈Θ
Proof. Condition on An . Applying the pointwise regret inequality (3) at θ = θb gives, for almost every x, q b ≤ 2 2Cw,x Reg (θ) Ew,x b , b b (v b) + Btilt,x (w) x
θ
where Cw,x := Ax Bx . Using Cw,x ≤ C̄wb and Jensen’s inequality over the fresh test context, b b q h i b | An ≤ 2 2C̄wb Ēwb (v b) + B̄tilt (w) EX RegX (θ) b . θ Taking full expectation over the training procedure and applying Jensen’s inequality once more, q h i b ≤ 2 2C̄wb E Ēwb (v b) + B̄tilt (w) b . E RegX (θ) θ Theorem D.2 controls the first term, and Proposition D.4 controls the second term. Therefore, E Ēwb (vθb) + B̄tilt (w) b ≤ E inf Ēwb (vθ ) + 4Rn (Fwb ) + η + λ2 Ctilt . θ∈Θ
Substituting this bound proves the corollary. Corollary D.6 is a full-expectation finite-sample bound. The first term is the expected approximation error; it vanishes in the realizable case, namely when there exists θ⋆ ∈ Θ such that −1/2 vθ⋆ (Y) = uw,X ) under standard sieve or growing-class b (Y) almost surely. It can be O(n approximation conditions. The second term is the full expected Rademacher complexity of the weighted loss class. For bounded-complexity classes, such as fixed-dimensional parametric models, finite-pseudodimension classes, or norm-controlled neural-network classes, one typically has Rn (Fwb ) = O(n−1/2 ). The optimization term is O(n−1/2 ) whenever the empirical DW-FM objective is solved to accuracy η = O(n−1/2 ). The tilting term is O(n−1/2 ) if the reweighting strength is chosen as λn = O(n−1/4 ). Therefore, under these conditions, Corollary D.6 implies h i b = O(n−1/4 ). E RegX (θ)
E
Experimental Details
E.1
Synthetic Polynomial Portfolio Task • Context generation: Context vectors x ∈ Rdx are sampled i.i.d. from a standard multivariate Gaussian N (0, Idx ). The dimensionality dx corresponds to the number of covariates for the portfolio mapping. • Polynomial return map: For each asset i ∈ {1, . . . , d}, the next-period return is generated via a polynomial function of the context: fi (x) =
dx X
wij xdeg j ,
deg ∈ {2, 4, 6, 8},
wij ∼ Uniform[−1, 1]
(6)
j=1
where deg is the polynomial degree sweep parameter, and wij are randomly sampled coefficients fixed per experiment. • Stress interpolation: To control the probability of high-risk events, returns are generated as a mixture between the baseline polynomial map (plus Gaussian residual) and heavy-tail stress: si = (1 − λstress ) · fi (x) + N (0, σ 2 ) + λstress · ϵi , λstress ∈ [0.05, 0.35] (7) where σ 2 is the variance of the baseline Gaussian residual, and λstress controls the frequency of stress-tail scenarios. Additive noise ϵi is drawn from a Student-t distribution with degrees of freedom ν = 3 and scale β = 0.02 to simulate extreme risk events: ϵi ∼ tν=3 (scale = β). • Target outputs: Next-period portfolio returns s ∈ Rd , with d = 10 for standard semi-real portfolio evaluation.
• Downstream solver: Long-only portfolio optimization with mean+CVaR objective: min E[−s⊤ z] + γCVaRα [−s⊤ z] + η∥z∥22 , z
subject to simplex constraints 0 ≤ zi ≤ 0.30, η = 1e − 3.
P
i zi = 1. Parameters α = 0.95, γ = 2.0,
• Scenario sampling: For each context x, M = 512 scenarios are sampled using the above mixture to generate a distribution of potential returns for downstream optimization. • Evaluation metrics: Regret, hardest-25% context regret. E.2
Semi-Real Portfolio-CVaR Task • Data: Ken French 10 Industry Portfolios returns + Fama-French daily factors. 99dimensional context features constructed as follows: – Lagged 1–5 days of each factor – Rolling volatility estimates (20-day) – Industry-specific lagged returns – Standardized using training set mean/std only • Target outputs: Next-day returns s ∈ R10 . • Train/Validation/Test split: Chronological, 70% / 10% / 20%. • Downstream solver: Long-only portfolio-CVaR optimization with γ = 2.0, η = 1e − 3, CVaR0.90 . • Scenario sampling: 512 scenarios per context via FM model. • Evaluation: Regret, realized CVaR loss.
E.3
PEMS-BAY Traffic Congestion Task • Data: PEMS-BAY traffic sensors, 325 sensors, 5-minute frequency, chronological order maintained. Each context xt ∈ R325 represents the current traffic state across all sensors at time t. • Target outputs: Next-step congestion load per sensor, st ∈ R325 , defined as train st,i = max(0, q40,i − speedt,i ), train where q40,i is the 40th percentile speed for sensor i in the training set.
• Train/Validation/Test split: Chronological split: 70%/10%/20%. • Downstream solver: CVaR-constrained allocation to minimize aggregate congestion across all sensors: ⊤ min E c⊤ t zt + γ CVaRα ct zt zt
P subject to linear convex constraints i zt,i = 1, 0 ≤ zt,i ≤ ui , and Azt ≤ b, where zt represents the allocation of mitigation resources (e.g., signal control adjustments, lane priorities), ct is the congestion load vector, γ is CVaR weight, α = 0.95, ui is per-sensor allocation upper bound, and A, b encode additional linear feasibility constraints. • Solver implementation: Uses CVXPY with a linear approximation of CVaR via auxiliary variables. Tolerance set to 10−6 , maximum iterations 1000. • Scenario generation: For DW-FM evaluation, M = 512 predicted congestion scenarios per context are generated using model sampling. • Evaluation metrics: Regret.
E.4
Training / Model Hyperparameters • Flow Matching model: 2-layer MLP, width 64, ReLU activation. • Optimizer: Adam, learning rate 1e−3, weight decay 1e−4, batch size 256, training steps 400 per smoke experiment, full training steps 200k for main experiments. • FM sampling: base distribution standard Gaussian, linear interpolation, ODE steps = 1. • DW-FM: λ grid {0, 0.001, 0.002, 0.005, 0.01, 0.02}, selected by validation regret on the validation split. • Reference decision: ẑx computed via frozen SAA solver; endpoint weights reweighted plug-in via Algorithm 1.
E.5
Compute Resources • Experiments run on NVIDIA GeForce RTX 4090 GPUs. • Peak GPU memory per card ≈ 24GB. • Controlled synthetic degree sweep smoke: 1–2 hours per λ per degree. • Semi-real portfolio-CVaR smoke: 2–3 hours per λ on 1024 test contexts. • PEMS-BAY traffic smoke: 0.12–0.14s per context for K=100. • Total aggregate GPU hours across all tasks: ∼ 300–400 GPU-hours.
F
Limitations
Our work has several limitations. First, the theoretical guarantees rely on regularity and coverage assumptions, including smooth transport paths, no-boundary-flux conditions, and pathoverlap/sensitivity-coverage between the learned flow path and the interpolation distribution. These assumptions make the regret analysis tractable, but they may be violated in finite-sample training, under heavy-tailed data, or when the learned ODE path moves through regions poorly covered by the training interpolation distribution. Second, DW-FM currently relies on differentiable loss information with respect to the uncertain outcome in order to construct endpoint weights. For non-smooth, discrete, black-box, or simulator-based objectives, additional smoothing, surrogate gradients, or alternative weighting rules may be required. Moreover, our empirical evaluation focuses on CVaR-based decision problems, with two portfolioCVaR benchmarks and one traffic-CVaR benchmark. These tasks support the effectiveness of decision-weighted training in risk-sensitive CSO, but they do not establish universal gains across all stochastic optimization problems.