Tutorials › Response-Adaptive Randomization › Treatment Arms as Actions and Outcomes as Rewards

Bandit Formulations · Tutorial 280 of 501

Treatment Arms as Actions and Outcomes as Rewards

Learn to specify a clinical action set and a defensible, consistently oriented reward that represents each assigned patient’s observed outcome.

Advanced 9 min read

What You'll Learn

  • Define treatment arms as actions in a clinical bandit formulation.
  • Specify the outcome, assessment time, and reward mapping before allocation.
  • Convert benefit, harm, and composite outcomes into numerical rewards.
  • Explain when a change of reward scale preserves arm rankings.
  • Detect coding choices that reverse or distort the clinical objective.

From a Treatment Choice to a Reward

A bandit formulation starts by representing each available treatment choice as an action and each participant’s observed response as a numerical reward. This translation is not merely a change of labels. It determines what the allocation problem treats as desirable. If a larger reward is meant to represent a more favorable patient outcome, the outcome definition and its numerical coding must make that interpretation true for every arm.

For a clinical trial, an action is usually a treatment arm, but it should be defined precisely enough to identify the intervention: for example, a specified drug and dose with a stated schedule, rather than an ambiguous label such as “active treatment.” The reward is computed from an outcome measured for a participant assigned to that action. Choosing a reward does not, by itself, specify an allocation rule or a statistical model for outcomes. It specifies what numerical information an allocation rule will receive.

Definition: Let \(\mathcal{A}=\{1,\ldots,K\}\) be the set of \(K\) available clinical actions, with each action \(a\) corresponding to a precisely defined treatment strategy. For participant \(t\), let \(A_t\in\mathcal{A}\) denote the assigned action, let \(Y_t\) denote the prespecified observed clinical outcome, and let \(g\) be a prespecified reward mapping. The observed reward is \(R_t=g(Y_t,A_t)\). A reward is oriented so that, under the intended clinical objective, a larger value represents a more favorable outcome.

The mapping \(g\) may use the outcome alone or may depend on the assigned action—for example, if the arms use different dose-specific rules for calculating a score. Whatever the mapping, it should be defined in a way that gives rewards a consistent interpretation across actions. The outcome itself should also be stated precisely: what is measured, in what units, and at what assessment time. “Response” is not a sufficient specification if it could mean either symptom improvement at four weeks or survival at one year.

Conditions for a Meaningful Mapping

Before rewards are used, several practical and conceptual conditions should be checked. These are conditions for interpreting the resulting numbers, not a claim that one particular reward is right for every clinical question.

  • Actions are well specified. Each arm identifies a treatment strategy that can be assigned and distinguished from the other arms. If a treatment label hides meaningful variation in dose, schedule, or accompanying care, then the action is not yet defined clearly enough.
  • The outcome and observation window are fixed. Each participant’s reward must refer to the same prespecified outcome concept and assessment period. Otherwise, differences in reward may reflect different measurement rules rather than different clinical results.
  • The direction is consistent. Larger reward values must always mean more favorable outcomes. If the recorded variable increases with harm, its coding must be reversed or otherwise transformed before it is used as a reward.
  • The numerical scale expresses the intended trade-off. When several outcomes enter one reward, their weights and any thresholds should reflect a stated decision objective, rather than being chosen after seeing which arm looks best.
  • Rewards can be calculated reliably. The data collection plan must make the inputs and the reward calculation available for each assigned participant. A rule for an outcome that is unmeasured or ambiguously recorded cannot produce a well-defined reward without additional decisions.

A convenient summary for an action is its mean reward in a specified patient population and assessment setting. Write \(\mu_a=E(R_t\mid A_t=a)\) when this expectation is well defined. This notation describes a population average on the chosen reward scale; it does not make the scale clinically meaningful by itself. Comparing \(\mu_a\) across actions answers a useful question only if the same reward definition and target context apply to all arms.

Worked Example: Coding a Binary Clinical Response

Suppose a hypothetical trial compares usual care with a new treatment. The prespecified outcome is whether each participant meets a clinical response criterion at day 30. Define \(Y_t=1\) for response and \(Y_t=0\) for no response. The trial’s stated objective for this example is to favor a higher response rate, and no other outcome enters the reward.

Use the reward mapping \(R_t=Y_t\). A participant who responds receives reward \(1\), and a participant who does not respond receives reward \(0\). If 18 of 30 hypothetical participants assigned to one arm respond, the total observed reward is \(\sum_{t=1}^{30}R_t=18(1)+12(0)=18\), and the mean reward is \(18/30=0.600\) response per participant.

The interpretation is direct: on this coding, a larger mean reward corresponds to a larger proportion meeting the day-30 response criterion. The coding is appropriate only for the stated objective. It does not account for severity of response, adverse effects, or other outcomes, so it should not be described as a complete measure of overall clinical benefit unless that narrow objective is genuinely the intended one.

Rewards for Continuous and Multiple Outcomes

When an outcome is continuous, the reward can often be the outcome itself or a clearly defined transformation. The direction needs particular attention. For example, a higher symptom-severity score may be worse, even though a bandit reward is conventionally oriented so higher is better. A transformation such as baseline severity minus severity at a fixed follow-up time yields a positive value for improvement, provided that larger severity scores mean worse symptoms.

Some clinical decisions involve more than one outcome. A scalar reward can combine them, but doing so requires an explicit rule for trading one outcome against another. A weighted sum is one transparent option, not a neutral default. Its weights determine how much one unit of an outcome counts relative to a unit of another outcome. If the scales or weights change, the clinical objective may change too.

Worked Example: Turning Symptom Change into Reward

In a hypothetical two-arm trial, symptom severity is measured on a 0-to-10 scale at baseline and again at week 4, with higher scores indicating worse symptoms. For this example, define the observed reward as improvement in severity points: \(R_t=Y_{t,\mathrm{baseline}}-Y_{t,\mathrm{week\,4}}\).

A participant assigned to a specified treatment arm has a baseline score of 8 and a week-4 score of 5. The reward is \(R_t=8-5=3\) points of improvement. A second participant has scores of 6 and 7, giving \(R_t=6-7=-1\) point; the negative reward correctly represents worsening by one point.

If 20 hypothetical participants in an arm have a total of 24 improvement points, their mean reward is \(24/20=1.20\) points of improvement per participant. The unit is symptom-scale points, not a proportion or a treatment effect. This mapping is interpretable when both measurements use the same scale and the same baseline-to-week-4 definition in every arm. It also makes an assumption about what matters: the reward treats a one-point improvement as the same numerical increment wherever it occurs on the scale. Whether that is clinically appropriate is a separate decision.

Worked Example: Defining a Composite Reward

Consider a hypothetical trial in which the prespecified participant-level measures are a binary symptom response \(B_t\) at week 4 and an indicator \(H_t\) for a serious adverse event by week 4. Let \(B_t=1\) for response and \(0\) otherwise; let \(H_t=1\) if the event occurs and \(0\) otherwise. The clinical team specifies the example’s utility rule in advance: a response contributes \(+1\) reward unit, and a serious adverse event contributes \(-2\) reward units.

The resulting rule is \(R_t=B_t-2H_t\). A participant with a response and no serious adverse event has reward \(1-2(0)=1\). A participant with no response and an event has reward \(0-2(1)=-2\). If both occur, the reward is \(1-2(1)=-1\); if neither occurs, it is \(0\).

Suppose 10 hypothetical participants in one arm yield 5 with response and no event, 1 with both, 2 with an event and no response, and 2 with neither. The total reward is \(5(1)+1(-1)+2(-2)+2(0)=5-1-4+0=0\). The mean reward is \(0/10=0.000\) reward units per participant. This calculation follows the stated rule exactly. It does not establish that the event should count twice as much as a response; that weight is a clinical value judgment that must be justified and fixed before using the score to guide decisions.

Why Scale Choices Matter

A useful property of a common positive affine transformation is that it preserves the ordering of arm mean rewards. Suppose a reward \(R_t\) is replaced for every action by \(R'_t=c+dR_t\), where \(c\) is a constant and \(d>0\). Then

$$ E(R'_t\mid A_t=a)=c+dE(R_t\mid A_t=a)=c+d\mu_a. $$

Because \(d\) is positive, if \(\mu_a>\mu_b\), then \(c+d\mu_a>c+d\mu_b\). Thus, changing all rewards to a common scale by adding the same constant and multiplying by a positive constant does not reverse the ranking of mean rewards. This result concerns the ordering of means; it does not mean all other features of a reward-based decision procedure are unaffected by rescaling.

If \(d<0\), the ordering reverses: the transformation turns a larger original value into a smaller transformed value. If the transformation is nonlinear, even the ordering of mean rewards can change. For instance, an average of transformed values need not equal the transformation of the average. The derivation is simply

$$ E\{h(R_t)\mid A_t=a\}\ne h\{E(R_t\mid A_t=a)\} $$

in general for a nonlinear function \(h\). Therefore, a reward transformation is not just cosmetic unless its effect on the objective has been checked.

This is also why composite rewards should be documented in their own units. A weighted score may be reported in utility units rather than clinical units, and the weights must be interpretable as part of the decision rule. If the intended purpose is instead to keep several outcomes distinct, reducing them to one number may hide important trade-offs. The appropriate choice depends on the clinical decision being represented.

Diagnostics, Alternatives, and Limitations

Several checks can expose a reward definition that is going wrong before it is used:

  • List plausible outcome values and calculate their rewards by hand. Confirm that better clinical outcomes receive larger rewards and that boundary cases have sensible values.
  • Check the reward calculation with the units written explicitly. Adding an unscaled laboratory value to a binary event indicator, for example, has no clear meaning without a stated conversion or weighting rule.
  • Verify that the outcome window, thresholds, and scoring rule are the same for every arm. Arm-specific definitions can make the numerical comparison misleading.
  • Review missing or delayed outcome cases. If the mapping cannot be applied, do not silently treat an unobserved outcome as zero; zero is a substantive reward value, not a generic code for missingness.
  • Ask whether reasonable alternative weights would change the preferred arm. A change in ranking signals that the decision depends materially on the chosen trade-off.

There are three broad choices to distinguish. Using a single raw endpoint keeps interpretation close to its clinical units but may omit other important benefits or harms. Using a prespecified utility score makes a trade-off explicit and yields one reward, but the result depends on the score’s weights and assumptions. Keeping outcomes separate avoids concealing their individual patterns, but does not provide a single scalar reward without an additional decision rule. None is universally best; the choice should match the clinical question.

A reward definition also has limits. It cannot repair poorly measured outcomes, remove bias in the trial, establish that an observed arm difference is caused by treatment, or guarantee that a scalar score represents every patient’s preferences. Nor does a reward definition specify how participants should be allocated. Its role is narrower and essential: it makes explicit which numerical consequence of an assigned treatment is being treated as favorable.

Common Mistake: Treating the Recorded Outcome as the Reward

A common error is to copy a recorded value directly into the reward field without checking its direction. For example, if an adverse-event count is coded as \(0,1,2,\ldots\), a larger raw count means more harm. Calling that count a reward would favor arms with more adverse events, the opposite of the intended clinical objective. The correction is to define and verify a directionally consistent mapping, such as a negative event count, or a prespecified utility rule that includes the event appropriately. The mapping should be checked with concrete cases before it is used.

Key takeaway: Define each treatment action precisely, specify the outcome and assessment time, and write the reward rule so that larger values consistently mean more favorable outcomes. A reward is a formal encoding of a clinical objective, not a neutral relabeling of the data.

Check Your Understanding

For each question, identify the reward rule or interpretation that follows from the stated information. Solutions are included below.

  1. A pain score is 2 at baseline and 6 at follow-up, with higher scores indicating worse pain. What is the reward if reward is defined as baseline score minus follow-up score?
  2. A binary endpoint equals 1 for a serious adverse event and 0 otherwise. Why is using this endpoint directly as reward inconsistent with an objective of avoiding harm?
  3. Rewards are transformed by \(R'_t=4+3R_t\). Does this preserve the ordering of mean rewards across arms? Explain.
  4. For a composite score \(R_t=B_t-2H_t\), calculate reward when \(B_t=1\) and \(H_t=1\), and interpret it under the defined rule.
  5. Why should an unobserved outcome not automatically be assigned reward 0?

Solutions. (1) \(2-6=-4\) pain-scale points, representing worsening by 4 points. (2) The direct coding gives a larger value to an event, so it rewards harm; the mapping must reverse or otherwise appropriately encode that direction. (3) Yes. Here \(c=4\) and \(d=3>0\), so each arm mean becomes \(4+3\mu_a\), preserving its ordering. (4) \(1-2(1)=-1\) reward unit: the response contributes \(+1\), while the event contributes \(-2\). (5) Zero is a defined reward value, not a missing-data label; substituting it would assert an outcome value that was not observed and could distort comparisons.

Clinical Biostats