Developer tools · Research feature

Healthcare Mechanisms from Policy-as-Code Search under Strategic Provider Response

A study uses AI to simulate hospital decision-making under financial pressure, showing how strategic responses shift outcomes in healthcare mechanisms.

Adapted from research by Zihan Wang, Xiang Xu, Hongyuan Zha and colleagues.

arXiv preprint revision · 2026-05-29 · Attribution & reuse
In this article
Editorial illustration of stack of documents.

Editor’s introduction

The research examines how hospital behavior changes under incentive structures by modeling provider actions such as coding, selection, delay, effort, and triage using language models. It finds that pressure to maximize profit leads to up-coding and selective patient routing, mirroring known health economics patterns. A single audit reveals that restricting coding significantly increases low-complexity patient selection, indicating a shift in strategic behavior. The study also identifies a mixed-objective program that reduces up-coding and patient rejection while preserving profit levels. However, the simulation limits routing complexity by using aggregated DRG data and disabling active strategic routing, which reduces realism in capturing dynamic provider behavior.

Introduction

A case-based payment becomes a coding rule, an audit reshapes patient selection, and a quality bonus redirects effort toward the measured score: in each case, a hospital mechanism is realized as the composition of an administrator’s instruction with a provider’s best response, and the composition---not the text---determines billing, access, and outcome.11 1 Healthcare-specific terminology used throughout the paper—including hospital DRG and DRG-style arrivals, hospital CMI, hospital KPI and KPI steering, the five provider-response channels (coding, selection, delay, effort, triage), the coding and measurement wedges, gold-plating, skimping, cream-skimming, the Identify–Produce–Settle (IPS) loop, and the hospital policy DSL—is collected in the glossary of Appendix L. The dynamic we focus on is pressure migration—a multi-channel feature of strategic best response in which, when a rule closes one provider channel, the same incentive resurfaces in an adjacent one, so a benchmark that scores rules against a fixed provider systematically over-rewards mechanisms whose effect is to relocate rather than remove distortion. We therefore evaluate hospital mechanisms inside a closed-loop strategic-response simulator, and because regulated deployment additionally requires every rule to remain auditable line by line, we restrict the administrator’s policy class to inspectable, typed rule programs—reframing mechanism design as program synthesis over a constrained administrative interface.

Pressure migration is visible across three decades of healthcare reform. Hospitals respond to Medicare diagnosis-pricing changes by re-coding rather than by treating more patients; Medicare Advantage risk scores grow faster than fee-for-service scores through coding intensity; and English NHS waiting-time targets change both reported waits and the operations that produce them. The machine-learning reading is direct: each is Goodhart-style drift delivered through a strategic-response shift in the data-generating process, of the kind formalized by strategic classification and performative prediction.

Existing benchmarks cannot see this dynamic. Healthcare AI environments train clinician-level policies on a fixed environment with passive providers, treating provider behavior as exogenous noise. Automated mechanism-design systems do model strategic response, but instantiate taxes, auctions, or generic allocation rather than healthcare primitives—reimbursement, audits, care-team queues, measured quality—and their searched controllers are black-box neural networks that fail line-by-line auditability. Neither camp scores administrator rules and strategic provider responses through realized access, reimbursement, and performance in the same rollout.

We instantiate the missing loop in Medi-Sim. Administrator rules are written as policy-as-code: typed, executable expressions over a fixed set of approved levers (incentive coefficients, audit intensity, bonus pool, performance-score weights) that are auditable line by line, and expose the kind of clear, context-relevant information emphasized in good machine learning practice for medical devices (GMLP). Providers respond through five named channels—coding, selection, delay, effort, and triage—drawn from health economics, and an Identify–Produce–Settle (IPS) loop keeps rules, responses, and outcomes in the same rollout, treating settlement (reimbursement, scores, bonuses) as part of the mechanism rather than a reporting layer. The same loop is the search interface: because candidates are typed code expressions over a small state-feature set, useful mutations are semantic edits over code rather than gradient steps or random rewrites—a regime in which LLM-guided code search outperforms unguided genetic operators, while line-by-line auditability rules out neural controllers. The language model therefore acts as a code-editing operator over the rule program under a safety-penalized closed-loop fitness; provider agents are parameterized response classes, not LLMs.

Three experiments close the loop. An incentive sweep recovers classical findings as adjacent regimes of one phase diagram—up-coding and low-complexity selection under profit pressure, balanced-interior Goodhart drift—and administrative lever sweeps expose pressure migration: audits shift pressure from coding to selection, while bonus pools and KPI-steered flex capacity reveal proxy and waiting-time failures. LLM-guided code search over the same rule interface refines a diverse warm-start library into an inspectable mixed-objective program that eliminates up-coding, halves rejection, and retains most of the profit-oriented baseline’s funds; ablations show warm-start priors and LLM-guided refinement to be jointly necessary.

Coding action

In L3, candidate_score is only the exposed behavioral scoring map for this channel. Edits to it reweight the coder’s sensitivity to fixed host-computed features such as upcode_pressure, audit_penalty, ethics_pressure, and coding_gap; candidate construction, audit, penalties, and clawback remain host-side settlement routines.

Patient routing

Patients register to service units rather than being reassigned by the hospital. In L1/L2 active strategic routing is disabled and KPI-aware steering acts only on the flexible capacity pool (§3.3), so selection and delay arise predominantly through the provider triage channel (§3.2); the external-validity implications are discussed in Limitations.

Triage and delay

Triage gates accept/reject/defer through a scalar score combining urgency, waiting, predicted margin, capacity, fatigue, and KPI-targeting signals; strategic delay is the cost-relief channel that parks high-cost cases under profit pressure, producing the L1 delay signatures of §5.1.

Empirical findings

The experiments highlight four mechanism-level findings. First, classical healthcare failures occupy neighboring regions of an incentive phase diagram. Second, the balanced interior hides risk on less-visible margins: up-coding and rejection recede while delay and KPI targeting intensify. Third, administrative controls move pressure across channels—audit closes coding but raises selection, bonus expansion worsens proxy alignment, and KPI-steered flexible capacity raises waiting. Fourth, policy-as-code search follows its objective: pure-profit search amplifies coding, whereas the mixed objective reshapes incentive geometry and removes up-coding while preserving much of the return.

Implications and closing

Medi-Sim makes three evaluation requirements explicit for healthcare policy ML: provider response should be endogenous, searched mechanisms should remain inspectable as code, and scalar reward should be decomposed into channel-level diagnostics so that reward gains through distortion are counted as failures. The released closed-loop environment instantiates these requirements with an Identify–Produce–Settle simulator and an AlphaEvolve-style search interface over a typed DSL. In the held-out mixed-objective evaluation, the searched policy eliminates measured up-coding while retaining much of the profit-oriented baseline’s funds, showing that policy-as-code search can reshape the channel through which return is earned. We hope Medi-Sim makes provider-side strategic response a standard benchmark target for ML on healthcare policy.

Limitations

Aggregated DRG and patient-choice routing. The default simulator uses an aggregated macro-DRG distribution and patient-choice registration. Active strategic hospital routing is disabled in L1/L2, and hospital KPI steering acts only on the flexible capacity pool. These choices keep the selection and delay channels attributable to provider triage, which is essential for the L1/L2 attribution claims, but they limit the realism of routing-heavy interventions.

Ethical Considerations

The simulator studies high-stakes healthcare operations. Its policies must not be interpreted as clinical recommendations or administrative guidance for real hospitals without domain validation, safety review, and fairness analysis. Modeling behaviors such as up-coding, cherry-picking, and strategic delay is intended for detection and stress testing, not for operationalizing manipulation. Any future deployment would require safeguards for patient access, equity across case complexity, clinical safety, privacy, and legal compliance.

AI and Reinforcement Learning for Clinical Decision-Making

A substantial line of work treats healthcare as a sequential decision problem at the patient level, learning treatment policies from electronic health records under offline RL formulations. The AI Clinician learns vasopressor and fluid policies for sepsis from MIMIC-III and reports lower in-hospital mortality relative to observed clinician behavior, and broader surveys catalogue similar formulations for chronic disease management, anesthesia, and ventilation. Methodological guidelines emphasize off-policy evaluation, distributional shift, and reward specification as the core obstacles to safe clinical deployment. This literature optimizes the clinician’s action on a single patient and assumes a fixed reward and a fixed environment. Medi-Sim operates one level above this layer: the action is a hospital administrative rule (incentive coefficients, audit probability, capacity allocation, hospital KPI weights), the environment is a population of strategic providers, and the realized policy is the composition of the hospital administrator’s mechanism with the providers’ best response. Patient-level clinical RL is thus complementary to, not a substitute for, the mechanism-level question we study.

Healthcare Incentives and Operations

Provider behavior under payment rules has been studied for three decades through agency theory and operational flow. Cost and quality incentives under prospective payment can produce creaming, skimping, dumping, and intensity shifts. Empirical studies on Diagnosis-Related Groups confirm that administrative pricing shifts directly alter case mix and coding, and more recent evidence from Medicare Advantage shows that risk-adjusted diagnosis-based reimbursement raises reported risk scores by 6–16% without commensurate change in underlying morbidity. On the operational side, hospital flow is highly sensitive to capacity: queueing analyses show wait times escalate non-linearly near full utilization, and flexible bed allocations partially mitigate the load under realistic routing constraints. Healthcare-specific simulation has been used for decades to study these flows, but predominantly as isolated discrete-event models without strategic agents. Medi-Sim integrates this macroeconomic payment layer and microeconomic operational layer into a single executable closed loop in which coding, capacity, and revenue interact.

Measurement, Auditing, and Strategic Gaming

Prospective payment introduces an informational wedge between ground-truth clinical complexity and reported billing groups. Pervasive up-coding has been documented across ownership structures, and economic audit theory characterizes how monitoring rates and penalties govern this “DRG creep”. Performance measurement creates a parallel friction: when scored metrics are imperfect proxies for the planner’s objective, high-powered incentives intensify multitasking distortions and target gaming. Systematic reviews of pay-for-performance in healthcare reach a consistent verdict that contract design and local context determine whether bonuses improve care or merely move metrics. Formal taxonomies of Goodhart-style failures (regressional, extremal, causal, adversarial) clarify why such gaming is structural. Medi-Sim models the hospital coding wedge and the hospital measurement wedge as dynamic, interactive processes, attributing each distortion to the agent that actually makes the choice (clinician/hospital coder for up-coding, triage for selection and delay, hospital administrator for routing and incentive design), so that channel-level distortion becomes a measurable property of the rollout.

Strategic Machine Learning and Algorithmic Mechanism Design

Our problem interfaces directly with the machine-learning literature on agents that respond to a deployed rule. Strategic classification formalizes Stackelberg learning against a manipulable agent and has been extended to revealed-preference observations and to practical, end-to-end differentiable training pipelines. Performative prediction generalizes this to settings in which the deployed model itself shifts the data distribution and characterizes performative equilibria. The reward-shaping side of this literature gives formal notions of reward hacking: optimizing an imperfect proxy can never be made safe by narrowing the reward function alone under mild structural assumptions. In parallel, differentiable economics has used deep architectures to construct optimal multi-dimensional auctions from data. These neural mechanisms achieve strong objective values but yield black-box controllers whose parameters resist verification. Medi-Sim adopts the strategic-learning stance (provider best response is part of the environment) and the algorithmic-mechanism-design objective (synthesize a rule that is robust to that response), but constrains the policy class to read-and-comply programs, which is what regulated healthcare deployment actually demands.

Designing macro-policies by modeling micro-agent adaptation has recently scaled through multi-agent reinforcement learning and large-language-model agents. The AI Economist frames optimal taxation as a two-level RL problem in which agents and a planner co-adapt. LLM-based generative agents extend this paradigm to believable populations of social actors, and frameworks such as Concordia operationalize generative agent-based modeling with grounded actions and an explicit game-master adjudication layer. The LLM-economist line scales mechanism design to large generative simulacra of taxpayers and consumers. However, these systems instantiate consumption, taxation, or social interaction as their domain primitives, not capacity-constrained clinical care, and they typically train neural controllers whose decision logic is not directly auditable. To navigate a non-differentiable and tightly regulated mechanism space without sacrificing inspectability, we build on LLM-guided evolutionary program search: FunSearch surpassed best-known constructions in extremal combinatorics and online bin packing by treating an LLM as a structured mutation operator over code; ELM showed that LLM-based mutation can drive open-ended evolution in code-defined domains; AlphaEvolve generalizes this to algorithmic discovery across mathematics, hardware, and learning systems; and Eureka demonstrates that the same recipe can author RL reward functions that outperform expert humans on a majority of robotics tasks. More broadly, LLMs have been studied as black-box optimizers in their own right. Medi-Sim adapts this paradigm to healthcare mechanism design: a candidate hospital policy is a typed executable program over a constrained hospital policy DSL of administrative levers, and the evaluator scores it on stochastic multi-agent rollouts under safety, access, and distortion constraints, yielding policies that are simultaneously high-performing, robust to provider best response, and human-readable.

Strategic delay as a cost-relief substitute

Taken together, panels (g) and (h) furnish quantitative evidence for the multitasking claim in §5.1: where the headline KPI–health correlation is most negative, the responsible channels are not effort distortion but patient-level delay and team-level case-mix tilt acting in concert.

Arrival-process scope note

This is the scope condition. If patient demand responds directly to the hospital policy or to reputation generated by earlier policies, the arrival kernel is no longer fixed. That feedback can be modeled as an additional demand-response channel, but it is outside the present L1/L2/L3 experiments.