A record of what an AI did is not a complete record of what would have happened if it had chosen differently. Off-policy evaluation studies how to estimate a target policy’s value using observations collected by another policy. In a contextual bandit setting, only the reward of the selected action is normally observed. Under appropriate assumptions and coverage, methods such as inverse propensity weighting can recover useful estimates of another policy’s expected performance without deploying it immediately.
This article extends Vocabulary Coding and Engineering into the Second Intelligence Pool’s ability to learn from earlier decisions. We calculate a small fictional review-policy example, demonstrate why an action with zero logging probability cannot be evaluated by weighting, and propose a Z-layer decision-evidence record. The goal is to distinguish an observed result, a justified counterfactual estimate and an unsupported promise. The mathematics does not give an AI permission to take a consequential action or prove that a simulated result will generalise to every environment.
- A logging policy describes how the observed actions were selected.
- A target policy is the alternative decision rule being evaluated.
- Off-policy evaluation estimates value rather than observing every alternative outcome.
- Inverse propensity weighting requires adequate support and justified action probabilities.
- Rarely chosen actions can produce unstable, high-variance estimates.
- Model-based and doubly robust methods also depend on assumptions.
- Preserve context, action, outcome, probability, scope and policy version together.
Choose your reading route
Understand logged decisions · Calculate the value of another policy · Design a transferable decision record
Contents
Understand logged decisions · Sections 1–4
Calculate the value of another policy · Sections 5–8
Design a transferable decision record · Sections 9–12
1. One decision hides the other outcomes
Imagine a fictional archive that chooses either standard or extended review for each incoming document. It observes whether that particular document subsequently passes a quality check. The record does not reveal what would have happened to the same document under the review option that was not used.
An AI trained on those records proposes a new decision policy. A reviewer wants to estimate the new policy’s success rate without immediately changing the archive’s operating procedure. Simply reading the success rates of the two selected action groups might be misleading if harder documents were more often assigned extended review.
The earlier article on counterfactual meaning identifies why an unobserved alternative outcome is different from an observed fact. Off-policy evaluation offers a specific statistical framework for using available observations to estimate selected counterfactual quantities under explicit assumptions.
2. Distinguish the logging and target policies
Wang, Agarwal and Dudík’s 2017 research on contextual-bandit off-policy evaluation studies estimators of a target policy’s value from another policy’s logged data. Contextual bandits offer a useful simplified setting: a context is observed, one action is selected, and a reward associated with that action is recorded.
Let X denote a document’s pre-decision context, A the selected action and R the reward. Let μ(a given x) be the logging policy’s probability of selecting action a in context x, and let π(a given x) describe the target policy. The target policy value is its expected reward in the specified context population and environment.
This setup assumes more than the presence of three columns in a dataset. The action must be meaningfully defined, the reward must match the intended evaluation, and the logging probabilities and relevant causal conditions must be justified. A history generated by a different population may also require a separate transport argument.
Contents · Previous section · Next section
3. A small fictional decision history
Suppose the archive’s logging policy selects extended review with probability 0.5 and standard review with probability 0.5 in every context. Assume random assignment under the toy model and a binary reward equal to one if the document meets the stipulated quality criterion. The proposed target policy selects extended review every time.
| Event | Logged action | Logging probability | Reward |
|---|---|---|---|
| 1 | Extended | 0.5 | 1 |
| 2 | Standard | 0.5 | 1 |
| 3 | Extended | 0.5 | 0 |
| 4 | Standard | 0.5 | 0 |
| 5 | Extended | 0.5 | 1 |
| 6 | Standard | 0.5 | 1 |
The target policy is deterministic, but the log is not. Three observed events used extended review. Two of those received reward one. The other three records tell us about standard review; they do not directly supply the extended-review outcomes for the same cases.
We can now show how weighting accounts for the probability that a logged action matches the target. The example is a calculation, not a claim that six observations are sufficient for a real deployment.
Contents · Previous section · Next section
4. Calculate inverse propensity weighting
The inverse propensity scoring estimator averages weighted rewards, with each event weighted by the ratio of its target action probability to its logging action probability. Here an extended-review event has weight 1 divided by 0.5, or 2. A standard-review event has weight zero because the target never chooses it.
| Event | Weight | Weighted reward |
|---|---|---|
| 1 | 2 | 2 |
| 2 | 0 | 0 |
| 3 | 2 | 0 |
| 4 | 0 | 0 |
| 5 | 2 | 2 |
| 6 | 0 | 0 |
| Sum | 6 | 4 |
Divide the total weighted reward of four by all six logged events. The resulting estimate is 4/6, approximately 0.667. It estimates the target policy’s value under the declared setting; it is not six directly observed outcomes from that target.
In this particular balanced example, the result happens to equal the average reward among matching actions. With context-dependent assignment probabilities or different realised matching counts, these calculations need not coincide. Do not replace the estimator by a convenient subset average without justifying the change.
Contents · Previous section · Next section
5. Why the weighting can work
In the simple contextual-bandit model, condition on a context x. Each action a is selected with probability μ(a given x). Its contribution to the expectation of the weighted reward is that logging probability multiplied by π(a given x) divided by μ(a given x), and multiplied by the conditional expected reward.
The logging probability cancels where the target action has positive probability and the logging policy also has positive probability. Summing over supported actions gives the expected reward under the target policy for that context. Averaging over contexts yields the target value, assuming the stipulated reward and logging model are valid.
That cancellation explains the estimator’s purpose. It does not repair omitted confounding, incorrectly recorded probabilities, unsupported actions, interference between cases or a changing reward definition. The formal result belongs to the model, not to the arithmetic in isolation.
Contents · Previous section · Next section
6. Zero probability is a boundary of knowledge
Imagine a different archive that never chooses extended review for complex documents. The new target policy always chooses extended review, including for those complex cases. The corresponding logging probability is zero. There are no observed rewards for that action in that context.
The weighting formula cannot recover the missing evidence by dividing by zero. Two hypothetical worlds can produce identical logged data: in one, extended review helps complex cases; in another, it harms their performance. The available log cannot distinguish these worlds through direct action coverage alone.
The article on partial identification explains why evidence may permit several values. An AI should report that part of the target policy as unsupported, obtain additional legitimate evidence or make a separate, explicit model-based extrapolation. It must not label the unknown effect verified.
Contents · Previous section · Next section
7. Rare actions create an uncertainty problem
Suppose an action was logged with probability 0.01 but the target policy always chooses it in that context. A matching observation receives weight 100. Although such a weight is mathematically appropriate under the idealised estimator, a few matching events can dominate the numerical result. Sampling uncertainty may become large.
The expected value property of an estimator does not guarantee precision in a particular finite dataset. The cited research studies this difficulty and trade-offs among estimators. A responsible report should show the coverage of target actions, the distribution of weights and an uncertainty analysis appropriate to the sampling design.
Weight clipping or self-normalisation can be useful in some settings, but they change the estimator and may introduce bias or alter its finite-sample properties. The chosen procedure must be identified. A narrower displayed interval is not evidence of a better estimate if the method discarded an important source of uncertainty.
Contents · Previous section · Next section
8. Reward models and doubly robust estimates
An alternative is to build a model of expected reward given context and action, then use that model to predict target-policy performance. This direct method can evaluate actions through modelling assumptions even where empirical coverage is poor, but its conclusions depend on how well those assumptions hold.
Doubly robust methods combine reward modelling with propensity-based correction. Under appropriate conditions, a correctly specified component can support a useful guarantee even if the other component is misspecified. The exact property depends on the estimator, the data regime and its assumptions. It does not mean every estimate is reliable whenever two models are used.
Li and colleagues’ work on offline replay evaluation also illustrates why randomised logging is valuable for evaluating alternative decision rules. The methods address specific statistical problems, not the universal evaluation of every possible AI agent or unobserved world.
Contents · Previous section · Next section
9. A proposed Z-layer decision-evidence record
| Field | Purpose |
|---|---|
| Context | Relevant information available before action |
| Action set | Permitted, meaningfully defined alternatives |
| Logging policy | Actual probabilities and version |
| Chosen action | What was really done |
| Reward | Outcome, measurement and observation window |
| Target policy | Alternative decision rule under evaluation |
| Coverage | Supported actions, contexts and gaps |
| Estimator | Formula, assumptions and uncertainty analysis |
| Authority | Consent, constraints and deployment decision |
The W3C PROV model can document the origins of the log, decisions and evaluation. It does not establish that the logging design satisfies the assumptions. The relevant probabilities must be captured or justified, not reconstructed from the AI’s impression of why it chose an action.
ZTime can preserve the policy in effect at each event, the context known before selection and the time of outcome measurement. This prevents a later model from silently using future information as though it was available when the original decision was made.
Contents · Previous section · Next section
10. Zoom levels and the Second Intelligence Pool
At word scale, distinguish chosen, observed, estimated and counterfactual. At decision scale, retain the available actions and how one was selected. At organisational scale, preserve the policy that generated the record. At network scale, another institution may use the data to evaluate a different policy only under a justified transfer argument.
The article on causal transportability explains why a causal finding may not carry unchanged into another population. Off-policy evaluation focuses on changing the decision rule; transport focuses on changing the environment or population. Both questions may need to be answered before using a result in a new institution.
At civilisation scale, the Second Intelligence Pool could improve collective learning from historical choices. But a richer archive is not a collection of observations of all possible alternatives. Its value depends on preserving the process that produced its evidence.
Contents · Previous section · Next section
11. A four-week off-policy evaluation experiment
Week one: create a small synthetic contextual bandit with known reward probabilities and logging policies. Calculate the true target values independently. Week two: generate logs using the stipulated probabilities and test whether AI can reproduce the inverse propensity estimates and distinguish them from raw group averages.
Week three: introduce a zero-support action, rare matching events and incorrect propensity fields. Ask the agent to identify nonidentification, high uncertainty and invalid logs separately. Include a case where the outcome definition changes between data collection and evaluation. Week four: transfer a full evidence packet to another agent and require it to reproduce the calculation, explain limitations and refrain from treating the estimate as authorisation to deploy.
The study is proposed, not completed. A successful result would establish performance on a limited benchmark, not universal counterfactual knowledge.
Contents · Previous section · Next section
12. The frontier: inherit decisions without inheriting unsupported beliefs
Can AI evaluate a policy it has not deployed? Sometimes, using suitable logged data, coverage and assumptions. Can it evaluate every action absent from its history? No. Unsupported alternatives need additional evidence or explicitly identified extrapolation. Does a promising estimate mean the policy must be adopted? No. Values, consequences and legitimate authority remain necessary.
A portable intelligence system should be able to carry the context and selection mechanism behind every decision record. That would let later generations distinguish what happened from what can be estimated under a different policy.
The proposed Z-layer becomes more valuable when it protects the gap between the observed and the possible rather than filling it with confident language. Intelligence can learn more from history without pretending that history directly observed every alternative.
Contents · Previous section · Sources
Primary sources and further reading
- Wang, Agarwal and Dudík (2017), Optimal and Adaptive Off-policy Evaluation in Contextual Bandits
- Li et al. (2010 preprint), Unbiased Offline Evaluation of Contextual-bandit-based News Article Recommendation Algorithms
- Su et al. (2020), Doubly robust off-policy evaluation with shrinkage
- W3C PROV Overview
The numerical examples and proposed Z-layer studies are original teaching illustrations, not measured results of deployed AI systems. The formal guarantees hold under their stated assumptions.
Research and editorial review: 1 December 2026.
