Simulators of economies, epidemics, and cities are used to predict how a policy such as a carbon tax, an emissions market, or a lockdown will play out in different places. They are wrong in systematic ways. The simulated people are more rational than real ones, the frictions are cleaner, and the size of the error depends on the setting. At the same time, the real evidence on how policy effects vary by place is thin. It usually arrives as a handful of published numbers, for example "the effect was 0.083 in resource-dependent cities and insignificant in poorly marketized ones," not as unit-level treatment effects. This proposal asks whether a simulator can be corrected using only such subgroup averages. The correction is a learned curve that maps what the simulator predicts, shifted by a weighted summary of local context, to what actually happens.
The core idea fits in two sentences. Keep the simulator, which captures the complicated and often non-monotone structure of how policy effects vary with context, and learn only a correction of the form "real effect = an unknown increasing curve applied to (simulated effect + a weighted sum of context features)." Fit that curve and those weights by matching the averages it implies over real subgroups to the published subgroup estimates. The approach borrows the flexible-curve estimators of single-index models, which learn a linear projection and an arbitrary 1D curve together. It applies them where the monotonicity they require is actually plausible, and it replaces unit-level labels with aggregate moment conditions.
Core Claim
Let $x_i$ be the observed context of real unit $i$ (a city or state), $s(x_i)$ the policy effect a simulator predicts for that unit, and $\tau_i$ its unknown real effect. We model
$$\mathbb{E}[\tau_i \mid x_i] = g\big(s(x_i) + w^\top x_i\big),$$
where $w$ is a vector of context weights and $g$ is an unknown non-decreasing function with bounded slope. The real data consist of $K$ subgroup estimates $\hat m_k$ (for example DID coefficients for resource versus non-resource cities, high versus low marketization, or event-study years). Each comes with a standard error and a known membership set $G_k$ of units. We estimate $(w, g)$ by generalized method of moments:
$$\min_{w,\, g \in \mathcal{M}_L} \; \sum_{k=1}^{K} \frac{1}{\sigma_k^2}\Big(\frac{1}{|G_k|}\sum_{i \in G_k} g\big(s(x_i) + w^\top x_i\big) - \hat m_k\Big)^2,$$
with $\mathcal{M}_L$ the set of non-decreasing $L$-Lipschitz functions and $\sigma_k$ the reported standard error of $\hat m_k$.
The claim is that this division of labor resolves a tension in the literature. Non-parametric link learners with guarantees, namely the Isotron (The Isotron Algorithm), which alternates isotonic curve fitting with perceptron-style weight updates, and SLISOTRON (Efficient Learning of GLMs and SIMs with Isotonic Regression), which adds a slope bound to stop overfitting, need $g$ to be monotone. Yet real policy responses to context are often non-monotone. The Analysis of Carbon Emission's Characteristics and Dynamic Evolution reports inverted-U curves in central and western China and N-shaped curves in the east. We argue the non-monotone shape belongs in the simulator. What must be learned from data is only how simulated effects map to real ones, and "a place the simulator ranks as benefiting more really does benefit at least as much" is a far weaker and more defensible assumption than monotonicity in raw context. The context index $w^\top x$ captures the part of the gap that is itself context-dependent, for instance larger behavioral frictions in less marketized cities.
Relation to Prior Work
The closest method is Rw-ERM (Learning from Biased Data: A Semi-Parametric Approach). It corrects a biased training sample using only aggregate target moments by fitting a parametric density-ratio link with GMM, and it explicitly leaves non-parametric links as future work. We differ in three ways. Our link is non-parametric and monotone. It maps simulated outputs rather than reweighting samples. The moments are causal subgroup effects rather than covariate means. Rw-ERM supplies the moment-matching machinery and its reported gains show that aggregate moments can carry enough information.
Two AI Economist papers motivate the problem from the policy side. The AI Economist (Science) trains tax planners in a synthetic gridworld where agents co-adapt. That simulator is never grounded in real data. Building a Foundation for Data-Driven, Interpretable, and Robust Policy Design does calibrate an epidemic-economic simulator to real US state data, but fixes a log-linear form shared across all 51 states. We keep their calibrated simulator as $s(\cdot)$ and ask whether a learned, context-indexed curve beats a fixed form.
ERMAS handles the same gap in a different way: it trains planners against adversarially chosen boundedly rational agents within a slack $\epsilon$. That approach hedges against the gap instead of estimating it, and its slack is not tied to observed regional covariates. We treat ERMAS as a competing philosophy and compare against it directly.
Distributional anchor regression (Distributional anchor regression) and continuous domain indices (Domain-Indexing Variational Bayes) show that low-dimensional context indices can organize distribution shift. Neither calibrates a simulator or works from published effect estimates.
The empirical policy papers constrain the design as well as motivating it. The carbon-trading city panel (Carbon Emission Trading Policy and Carbon Emission Efficiency) and the environmental-tax panel (Identifying the Impact of Climate Policy on Urban Carbon Emissions) report exactly the kind of subgroup moments our estimator consumes. The second paper also warns of overlapping policies, so any moment we use inherits that confounding. Finally, the Gaussian gradient-flow analysis in Joint Learning in the Gaussian Single Index Model shows non-monotone links can be learned, but only under isotropic Gaussian inputs and infinite samples. That regime does not apply to a few hundred cities, which is why we do not pursue a fully non-monotone link.
Research Program
The first step is to build the estimator. We alternate two updates. With $w$ fixed, we solve for $g$ as a Lipschitz isotonic fit under linear moment constraints; this is a quadratic program over values of $g$ at the sorted index points. With $g$ fixed, we take a gradient step on $w$. Initialization sets $g$ to the identity and $w = 0$, which is exactly "trust the simulator." We will derive how many independent subgroup moments are needed to identify $w$, and how the Lipschitz bound $L$ trades bias against the ill-posedness of fitting a curve from $K$ averages. We expect error to be governed by $K$ and by how much the subgroups' index distributions overlap, not by the number of units.
The second step is a semi-synthetic protocol with ground truth. In each testbed a "real" system differs from the "simulator" in a context-dependent way. We give the method only subgroup averages of real effects and score it on unit-level real effects and on decisions made with the corrected predictions.
The third step is a real application. We use Chinese prefecture-city carbon policy panels, with published subgroup estimates as moments and some subgroups held out for prediction.
Baselines
The do-nothing reference uses the simulator's predictions $s(x_i)$ unchanged. Every method must beat it on held-out subgroup error, or the simulator is already adequate.
The strongest simple competitor is fixed-form recalibration. We fit $\tau \approx a + b\,s(x) + c^\top x$ or its log-linear analogue by the same weighted GMM on the same moments, mirroring the fixed functional form of Building a Foundation for Data-Driven, Interpretable, and Robust Policy Design. It has fewer degrees of freedom, so with few moments it may win. Beating it means lower held-out subgroup error and lower unit-level error in the semi-synthetic settings, with the gap growing as the true distortion becomes more curved.
The strongest existing moment-based method is Rw-ERM (Learning from Biased Data), adapted by reweighting simulated units with a parametric exponential density ratio fit to the moments. On its Life Expectancy experiment it reduced ordinary least squares MSE from 0.71 (biased) to 0.50, against a target-trained oracle of 0.45. On its synthetic mismatch task it matched the oracle MSE of 3.8, down from 6.3 for the biased fit. These numbers are not directly comparable to our tasks. They set the expectation that parametric moment matching closes most of a pure covariate-shift gap. Our method should matter only when the gap is a distortion of outcomes rather than a shift in who is sampled.
For decision quality, the robust competitor is ERMAS (ERMAS), which reports up to 15% higher social welfare than non-robust planners facing unseen boundedly rational agents in the Gather-Trade-Build gridworld. We run ERMAS and our calibrate-then-plan approach with the same planner architecture, training steps, and tuning budget, sweeping ERMAS's slack $\epsilon$ over the grid its authors use. Our method wins if planning against the corrected simulator gets higher real-system welfare than ERMAS at its best $\epsilon$.
On the econometric side, the baseline is linear interaction DID fit to the same real data.
Three ablations isolate the ingredients. The first drops the simulator and fits a single-index model on context alone, which is the obvious direct approach. The second drops the context index, so $g$ acts on $s(x)$ only. The third drops monotonicity and uses a free spline with the same smoothness. All methods see identical moments, identical context features, and equal hyperparameter search budgets chosen by leave-one-subgroup-out validation.
Why not just…?
Why not just fit a flexible heterogeneity model directly on real data and skip the simulator? When unit-level real effects are unavailable and only five to twenty subgroup averages exist, a direct flexible model has too little information to recover a non-monotone surface. Monotone single-index learners cannot represent the inverted-U and N-shaped patterns reported in The Analysis of Carbon Emission's Characteristics. The no-simulator ablation tests this. If it matches the full method, the simulator adds nothing and we will say so.
Why not just rescale the simulator with a fixed linear or log-linear link? This is the real threat. If the gap is close to affine, the fixed form will match or beat us with less variance. The semi-synthetic testbeds vary the curvature of the true distortion on purpose, so we can report where the crossover lies rather than assert a win. In the real carbon application, the held-out-subgroup comparison against this baseline is the deciding result.
Why not just randomize simulator parameters or train robustly, as in ERMAS, instead of calibrating? Randomization and robust training hedge rather than learn. RRLS finds domain randomization strong on average but weak against coordinated shifts, while worst-case methods give up nominal performance. A context-dependent gap is exactly a coordinated shift: less marketized places are systematically off in one direction. The Gather-Trade-Build comparison above measures whether calibration beats hedging. If ERMAS wins, the conclusion is that moment information is too weak to be worth using there.
Why not just add linear policy-by-context interactions to DID? Such models give constant slopes and cannot simulate new policies. The corrected simulator can do both. The held-out subgroup test compares them directly.
Proposed Experiments
The first testbed is a controlled physical sanity check on RRLS using its codebase SuReLI/RRLS. A fixed controller's return change under a design intervention (an action-scaling change) is measured in nominal MuJoCo dynamics as $s$ and in perturbed dynamics as $\tau$. The context is mass and friction parameters, and the moments are averages over bins of those parameters. No reported result was found on Lacuna for simulator-calibration error on RRLS, so all methods are compared against the do-nothing and oracle references only.
The second testbed is Gather-Trade-Build. The simulator uses rational agents, and the "real" system uses ERMAS-style boundedly rational agents whose slack varies with agent skill, which serves as the context. We measure calibration error and, after replanning taxes, real-system welfare. The target reference is ERMAS's reported gain of up to 15%.
The third testbed is the calibrated US pandemic simulator of Building a Foundation for Data-Driven, Interpretable, and Robust Policy Design, which reports a 4.7% federal welfare gain over historical outcomes and improvement for 33 of 51 states. Here we treat observed state outcomes as real, hold out groups of states defined by region and political lean, and test whether the corrected simulator predicts held-out group outcomes better than the log-linear form.
The real application uses the 282-city carbon-trading and environmental-tax panels. Moments are the reported overall, year-by-year, resource-based, and marketization subgroup estimates, including the 4.52% overall gain and the 0.0831 and 0.0845 subgroup coefficients from Carbon Emission Trading Policy and Carbon Emission Efficiency. A simple city-level abatement simulator supplies $s(x)$. We hold out one subgroup at a time and predict it. Because there is no unit-level ground truth here, this application tests plausibility rather than serving as proof.
The decisive checks follow from these testbeds. The learned $w$ should recover the true context-dependence of the gap in the synthetic testbeds. The method should beat fixed-form recalibration once the distortion is curved, and should not lose to it when the distortion is affine. The no-simulator ablation should fail on non-monotone contexts. If the free-spline ablation is not worse than the monotone version, monotonicity is not doing useful work and the claim needs revising.
References
- The Isotron Algorithm: High-Dimensional Isotonic Regression
- Efficient Learning of Generalized Linear and Single Index Models with Isotonic Regression
- The Analysis of Carbon Emission’s Characteristics and Dynamic Evolution Based on the Strategy of Unbalanced Regional Economic Development in China
- Learning from Biased Data: A Semi-Parametric Approach
- Building a Foundation for Data-Driven, Interpretable, and Robust Policy Design using the AI Economist
- ERMAS: Becoming Robust to Reward Function Sim-to-Real Gaps in Multi-Agent Simulations
- Distributional anchor regression
- Domain-Indexing Variational Bayes: Interpretable Domain Index for Domain Adaptation
- Carbon Emission Trading Policy and Carbon Emission Efficiency: An Empirical Analysis of China’s Prefecture-Level Cities
- Identifying the Impact of Climate Policy on Urban Carbon Emissions: New Insights from China’s Environmental Protection Tax Reform
- Joint Learning in the Gaussian Single Index Model
- Rrls: Robust reinforcement learning suite