First-Best Optimal Policy Learning Explained
- First-Best Optimal Policy Learning (OPL) is a framework for selecting policies that maximize expected welfare by mapping covariates to optimal treatments.
- It integrates risk-neutral and risk-averse criteria, utilizing methods such as regression adjustment, inverse-probability weighting, and doubly robust estimation to estimate policy value.
- The approach extends to constrained settings, censored survival outcomes, and offline reinforcement learning, ensuring robust decision rules under practical limitations.
First-Best Optimal Policy Learning (OPL) is the problem of selecting a policy that maximizes a welfare criterion over a policy class, often the unrestricted class of measurable maps from observed covariates or states to actions. In the potential-outcome treatment setting, the first-best or unconstrained optimal policy assigns each covariate profile to the treatment with the larger conditional mean outcome; in multi-action treatment settings, the same optimization can be posed under risk neutrality or under risk-averse criteria that penalize conditional variance or second moments (Cerulli, 2020, Cerulli, 8 Sep 2025). Across contextual bandits, constrained allocation, censored survival analysis, episodic reinforcement learning, and partially identified structural models, the term denotes the welfare-maximizing benchmark relative to the admissible policy class and feasibility constraints, not a single algorithmic template (Cerulli, 12 May 2026, Kubota et al., 24 Mar 2026, Wu et al., 2021, Russell, 2020).
1. Formal welfare criteria and oracle characterizations
In the multi-action treatment formulation, observed covariates are denoted by , treatment by , and observed outcome by . Using potential outcomes , the maintained identifying conditions are conditional independence,
and overlap,
for all and in the support of . A deterministic policy is a mapping , and first-best OPL chooses 0 from the unrestricted class 1 of all measurable functions 2 (Cerulli, 8 Sep 2025).
Under risk neutrality, the objective is
3
The same framework permits risk-sensitive criteria. With conditional mean 4 and conditional variance 5, a linear risk-averse decision maker with aversion parameter 6 uses
7
and the induced first-best policy solves
8
A quadratic risk-averse criterion instead penalizes the second moment,
9
so that
0
with
1
in practice (Cerulli, 8 Sep 2025).
In the binary-treatment case, let 2 for 3 and 4. The oracle first-best policy is
5
and the maximized welfare is
6
This is the omniscient benchmark obtained when the policymaker knows the conditional mean outcomes (Cerulli, 2020).
| Setting | First-best criterion | Source |
|---|---|---|
| Multi-action treatment | 7 or risk-averse variants | (Cerulli, 8 Sep 2025) |
| Binary treatment | 8 | (Cerulli, 2020) |
| Budget and coverage | 9 subject to budget and coverage | (Cerulli, 12 May 2026) |
| Censored survival | maximize 0 subject to 1 | (Kubota et al., 24 Mar 2026) |
| Episodic RL | policy minimizing 2 for all 3 | (Wu et al., 2021) |
| Partial identification | 4 | (Russell, 2020) |
This taxonomy indicates that “first-best” is defined relative to the feasible policy space and welfare functional. In unrestricted treatment OPL it is the measurable-policy optimum; in constrained or robust settings it is the optimum after imposing budget, coverage, censoring, or ambiguity structure.
2. Value-function estimation and implementation in multi-action treatment OPL
With i.i.d. observations 5, first-best OPL in the Stata implementation opl_ma_fb proceeds by estimating the conditional mean and, when needed, the conditional variance. The algorithm fits a linear model of 6 on 7 and 8 interactions, or separate regressions by action, to obtain 9; computes squared residuals and regresses them on the same design to obtain 0; forms an individual-level predicted welfare score 1; and assigns
2
saving the result by default as _opt_policy (Cerulli, 8 Sep 2025).
The predicted welfare score depends on the chosen model:
3
The implementation can also compare 4 to a benchmark policy, save match indicators, and produce summary frequencies. It then computes and reports the estimated value-function under 5 using the regression-adjustment formula, reported as e(V_opt_train) and e(V_opt_new) (Cerulli, 8 Sep 2025).
The companion command [opl_ma_vf](https://www.emergentmind.com/topics/opl_ma_vf) evaluates the maximal welfare after policy construction:
68
It returns three estimators of 6: regression adjustment (RA), inverse-probability weighting (IPW), and doubly robust (DR), stored in e(RA), e(IPW), and e(DR). The paper gives the example
“RA = 124.19, IPW = 109.50, DR = 125.31” (Cerulli, 8 Sep 2025).
The RA and DR estimators are
7
and
8
The DR estimator remains consistent if either 9 or 0 is correctly specified (Cerulli, 8 Sep 2025).
The same implementation includes graphical output. opl_ma_fb can produce gr_action_train, a bar-chart comparing the frequency of actual vs. optimal actions in the training sample; gr_reward_train, a scatter or line-plot of observed vs. maximal expected reward; and gr_reward_new, a plot of predicted reward 1 across the new sample. Alternatively, opl_plot_best displays side-by-side a scatter of “observed” vs. “maximal” predicted rewards and a categorical plot of “observed treatment” vs. “optimal treatment” for each 2 (Cerulli, 8 Sep 2025).
3. Restricted policy classes and empirical welfare maximization
Although first-best OPL is defined over unrestricted measurable policies, applied work often imposes a lower-dimensional structure. A prominent restriction is the threshold policy
3
where 4 is a one-dimensional score such as an estimated conditional treatment effect 5, a linear index, or a nonparametric score derived from domain knowledge (Cerulli, 2020).
The threshold-based formulation separates specification from policy selection. First, one estimates 6, often using regression adjustment or machine-learning methods such as causal forest, random forest, or boosted trees. Second, one chooses the scalar threshold 7 that maximizes welfare within the restricted class. With estimated outcome models 8, the empirical welfare for threshold 9 is
0
The unrestricted first-best threshold is
1
and the resulting policy 2 converges to 3 as 4 tracks the true 5 (Cerulli, 2020).
The empirical implementation protocol is a five-step “empirical welfare-maximizing” procedure: input 6; estimate 7 and 8 and compute 9; compute the unconstrained first-best welfare
0
evaluate 1 on a fine grid; and select
2
To obtain valid out-of-sample welfare estimates and confidence intervals, the procedure recommends sample splitting into two folds, cross-fit welfare evaluation, and bootstrap over the entire procedure, including sample splitting (Cerulli, 2020).
Under unconfoundedness, overlap, bounded outcomes, uniform consistency of 3 and 4, and Lipschitz continuity of 5, the paper states a uniform regret consistency result:
6
and any sequence 7 satisfies
8
The formal statement is framed as a proposition using Assumptions A1–A3: unconfoundedness, overlap, bounded 9; uniform consistency of 0 and 1; and Lipschitz continuity of 2 (Cerulli, 2020).
This restricted-policy literature clarifies a central distinction within first-best OPL: the oracle target is the unrestricted welfare maximizer, whereas operational policies may be threshold rules chosen because they are easy to interpret, easy to implement, or compatible with treatment-share constraints.
4. Constraint-driven and outcome-specific extensions
A major extension studies first-best OPL under explicit resource constraints. In the budget-and-coverage setting, the planner chooses binary decisions 3, where 4 if unit 5 is treated, with expected gain 6, cost 7, total budget 8, and minimum coverage requirement 9. The optimization problem is
0
The paper shows that this problem admits a knapsack-type structure and that the optimal policy can be characterized by an affine threshold rule involving budget and coverage shadow prices. With dual variables 1 for the budget constraint and 2 for the coverage constraint, the LP relaxation yields
3
under a non-degeneracy assumption, equivalently treating unit 4 iff
5
The LP relaxation has at most two fractional components, and if 6 for all 7, then
8
implying asymptotic equivalence in per-unit welfare. Two implementable algorithms are analyzed: Greedy–Lagrangian with Coverage (GLC), which is asymptotically exact in per-capita regret under boundedness and non-degeneracy, and rank-and-cut (RC), which is exact if costs are constant or the coverage multiplier is zero, but may misallocate when cost heterogeneity interacts with a binding coverage constraint (Cerulli, 12 May 2026).
A separate extension addresses right-censored survival outcomes. With logged data
9
the first-best OPL problem becomes
00
where
01
To correct censoring bias, the framework introduces IPCW-IPS and IPCW-DR. Under independent censoring, with 02 and importance weight 03,
04
With any estimator 05 and residual
06
the doubly robust estimator is
07
The paper states that IPCW-IPS is unbiased if 08 is correct and 09 is known, while IPCW-DR is unbiased if 10 is correct and either 11 or 12 is correct; it also states a variance reduction result in which IPCW-DR variance is no larger than IPCW-IPS variance by a nonnegative gap (Kubota et al., 24 Mar 2026).
These constrained and outcome-specific formulations preserve the first-best principle—maximize policy value over admissible policies—while altering either the feasible set or the statistical object being estimated.
5. Large action spaces, new actions, and optimization pathologies
In large-action contextual bandits, first-best OPL is often defined as learning a policy 13 that nearly maximizes
14
relative to the oracle policy that concentrates on the action with maximal true reward at each context,
15
A central recent finding is that optimization difficulties can dominate estimator quality. For OPE-based objectives such as IPS, cIPS, DR, MIPS, OffCEM, and POTEC, the paper proves that for any OPE estimator linear in 16 and a standard softmax parameterization 17, there exist problem instances where gradient descent is trapped in a suboptimal region for 18 iterations, and that the nonconcave landscape can have exponentially many local maxima in 19. By contrast, for weighted log-likelihood objectives
20
with an 21-regularized linear softmax policy, 22 is strongly concave in 23, so the loss admits a unique global minimum, no spurious stationary points, and can be optimized in 24 gradient steps to 25-optimality. Empirically, OPE-based methods are reported as highly fragile to batch size and learning-rate schedule, whereas PWLL methods remain robust across all configurations and often achieve higher validation reward and lower regret (Aouali et al., 3 Sep 2025).
A different response to large action spaces is structural decomposition. POTEC defines a clustering map 26 with 27 and factorizes the policy as
28
Stage 1 learns a cluster-selection policy by a low-variance policy-gradient estimator that only reweights cluster probabilities, while Stage 2 uses a regression-based within-cluster selector. Under Full-Cluster-Support and Local Correctness, the estimator is unbiased and the second-stage policy
29
is optimal within each cluster. The framework strictly generalizes pure policy-based and pure regression-based OPL: if 30, it degenerates to a pure regression-based policy; if 31, it degenerates to IPS policy gradient (Saito et al., 2024).
The evolving-action setting exposes a further limitation of standard first-best OPL. Let
32
Standard IPS and DR require 33 to produce unbiased estimates, and DM requires an action to appear in the logged data to train 34. Hence no standard estimator can assign positive probability to any 35. To address this, LCPI uses discrete action features and a pseudo-inverse correction:
36
where
37
Under Local Combination Support and Local Linearity, LCPI is unbiased for the policy gradient and can extrapolate to new actions that share supported features. PONA then blends LCPI and DR:
38
thereby trading off aggressiveness on new actions against conservatism on existing actions (Kishimoto et al., 18 May 2026).
Taken together, these results identify a recurring misconception: better off-policy value estimation does not automatically imply better first-best policy learning. In large action spaces, trainability, decomposition, and feature-based extrapolation can become the binding considerations.
6. Offline reinforcement learning, uniform guarantees, and partially identified environments
In episodic offline reinforcement learning, first-best OPL is tied to uniform policy evaluation. For a finite-horizon MDP with horizon 39, state space 40, action space 41, and offline data generated by a logging policy 42, the model-based plug-in estimator forms empirical reward and transition estimates, computes estimated occupancies 43, and evaluates
44
Uniform convergence means
45
with high probability. Once this holds, the empirical maximizer
46
satisfies
47
For the local class
48
with 49, the sample complexity is
50
and the paper states that this local-class result is rate-optimal up to logarithmic factors (Yin et al., 2020).
Online policy optimization in episodic tabular MDPs yields a related first-best notion. In that setting, the optimal policy 51 simultaneously minimizes 52 for all 53, and learning quality is measured by regret
54
RPO-SAT combines optimistic 55-estimates, an 56-OMD policy-improvement step with decaying step size, and a reference-value mechanism satisfying the “Stable at Any Time” property. With high probability, it achieves
57
When 58, this matches the information-theoretic lower bound up to logarithmic factors, making it nearly minimax optimal in that regime (Wu et al., 2021).
First-best OPL becomes still broader in incomplete or partially identified models. Russell’s framework defines a policy transform
59
where 60 and 61 is a known bounded function. If the data are compatible with a family 62 of admissible states rather than a single distribution, the policymaker chooses
63
Writing
64
the first-best problem is
65
The paper characterizes ex-ante learnability through PAMPAC-learnability and gives ex-post guarantees for the maximin empirical rule
66
together with 67-level set guarantees based on local Rademacher complexity (Russell, 2020).
This broader literature shows that first-best OPL is not confined to fully identified, unconstrained treatment assignment. Depending on the environment, it may denote an empirical welfare maximizer in a treatment study, a knapsack-optimal allocation under budget and coverage constraints, a censoring-aware optimizer of restricted mean survival time, a near-minimax policy in reinforcement learning, or a maximin rule under partial identification.