Inferensys

Glossary

Inverse Propensity Scoring (IPS)

An off-policy evaluation method that corrects for selection bias in logged data by re-weighting observed outcomes by the inverse probability of the action being taken by the logging policy.
Data scientist working on AI bias mitigation on laptop, fairness metrics visible, casual technical session.
OFF-POLICY EVALUATION

What is Inverse Propensity Scoring (IPS)?

A statistical method for unbiased policy evaluation using logged data.

Inverse Propensity Scoring (IPS) is an off-policy evaluation method that corrects for selection bias in logged data by re-weighting observed outcomes by the inverse probability of the action being taken by the historical logging policy. It provides an unbiased estimator of a new target policy's performance without requiring costly online deployment.

The technique addresses the fundamental mismatch between the data-generating behavior policy and the target evaluation policy. By assigning higher importance weights to actions that were rare under the logging policy but are common under the target policy, IPS creates a counterfactual estimate. This method is a cornerstone of causal inference and is often paired with Doubly Robust Estimation to reduce variance.

OFF-POLICY EVALUATION

Key Characteristics of IPS

Inverse Propensity Scoring (IPS) is a foundational off-policy evaluation method that corrects for selection bias in logged data by re-weighting observed outcomes by the inverse probability of the action being taken by the logging policy.

01

Core Mechanism: Inverse Weighting

IPS corrects for selection bias by re-weighting each observed outcome by the inverse of its probability under the logging policy. If a logging policy chose action a with probability p, the outcome is weighted by 1/p. This creates an unbiased estimator of the target policy's value, as rare actions receive higher weights to compensate for their under-representation in the data. The fundamental insight is that the expected value of the IPS estimator equals the true value of the evaluation policy.

02

The Propensity Score Requirement

IPS critically depends on knowing the exact probability that the logging policy assigned to each action. This is known as the propensity score. Key requirements:

  • The logging policy must be fully probabilistic, not deterministic
  • Propensities must be logged alongside every decision
  • The common support assumption must hold: any action the target policy might take must have a non-zero probability under the logging policy
  • Violations of common support lead to biased estimates and undefined weights
03

High Variance Problem

The primary weakness of standard IPS is extremely high variance, especially when propensity scores are small. If a logging policy assigns a probability of 0.001 to an action, the weight becomes 1000x, causing individual samples to dominate the estimate. This leads to:

  • Unstable and unreliable estimates from limited data
  • Sensitivity to outliers in the weighted distribution
  • Poor convergence rates in practice Mitigation strategies include weight clipping, self-normalization, and doubly robust estimation.
04

Self-Normalized IPS (SNIPS)

A practical variant that divides the weighted sum of rewards by the sum of the weights themselves, rather than by the total number of samples. This self-normalization introduces a small bias but dramatically reduces variance, often making it the preferred estimator in practice. The SNIPS estimator is equivalent to a weighted average of observed outcomes, which bounds the estimate within the observed reward range and prevents the extreme outliers that plague the standard IPS formulation.

05

Clipped IPS for Stability

Weight clipping caps the maximum importance weight at a threshold M, replacing any weight exceeding M with M. This trades a small amount of bias for a significant reduction in variance. Common practices:

  • Clip weights at values like 10, 50, or 100
  • The bias introduced is bounded and quantifiable
  • Clipping is often combined with self-normalization
  • The optimal threshold can be selected via cross-validation on a held-out logging dataset
06

Relationship to Doubly Robust Estimation

IPS forms one half of the Doubly Robust (DR) estimator, which combines IPS with a direct outcome model. The DR estimator uses the direct model as a baseline and applies IPS only to the residual error. This provides a crucial guarantee: the estimator remains unbiased if either the propensity model OR the outcome model is correctly specified. This double protection makes DR significantly more reliable than pure IPS in real-world applications where perfect propensity logging or outcome modeling is rarely achievable.

OFF-POLICY EVALUATION

Frequently Asked Questions

Clear, technically precise answers to the most common questions about Inverse Propensity Scoring and its role in unbiased off-policy evaluation.

Inverse Propensity Scoring (IPS) is a statistical off-policy evaluation method that corrects for selection bias in logged data by re-weighting observed outcomes by the inverse of the probability that the logging policy took the observed action. The core mechanism involves calculating a propensity score (\pi_0(a|x)) for each historical interaction, representing the probability that the behavior policy chose action (a) given context (x). The IPS estimator then computes the value of a new target policy (\pi_e) as: (V_{IPS} = \frac{1}{N} \sum_{i=1}^{N} r_i \frac{\pi_e(a_i|x_i)}{\pi_0(a_i|x_i)}), where (r_i) is the observed reward. This re-weighting creates a pseudo-population where the treatment assignment is independent of the covariates, effectively simulating what would have happened if the target policy had been in control. The method is provably unbiased when the logging policy has full support, meaning (\pi_0(a|x) > 0) for all actions where (\pi_e(a|x) > 0).

OFF-POLICY EVALUATION IN PRODUCTION

Real-World Applications of IPS

Inverse Propensity Scoring (IPS) is not merely a theoretical construct; it is a critical engineering tool for safely evaluating new personalization policies on historical data before risking live customer interactions. These applications demonstrate how IPS enables data-driven decisioning without the cost of online A/B testing.

01

Safe Offline Policy Evaluation for Recommenders

Before deploying a new deep learning recommender, IPS estimates its potential Click-Through Rate (CTR) using historical logs from the current production model. By re-weighting clicks by the inverse probability of the logging policy showing that item, data scientists can rank-order candidate models and discard underperformers without exposing a single real user to a bad experience. This is the standard gatekeeper for modern Netflix-style recommendation pipelines.

80%+
Reduction in risky online tests
Millions
User-years of data leveraged
03

Validating Dynamic Pricing Strategies

E-commerce platforms use IPS to evaluate a new surge pricing or discount targeting policy against historical transaction logs. The logging policy (e.g., fixed pricing) had a low probability of offering the deep discount the new policy proposes. IPS correctly up-weights those rare historical events to provide an unbiased estimate of revenue lift, preventing the deployment of strategies that would inadvertently cannibalize margins on price-insensitive customers.

2-5%
Typical margin recovery from debiased evaluation
05

High-Stakes Policy Evaluation in Healthcare

In clinical decision support, running a randomized trial on a new treatment recommendation algorithm can be unethical or impractical. IPS evaluates the new policy using Electronic Health Records (EHR) generated by doctors' historical decisions. By correcting for the confounding by indication—sicker patients were more likely to get the treatment—IPS provides a statistically sound estimate of the new algorithm's potential impact on patient outcomes before any clinical deployment.

100%
Zero patient risk during evaluation phase
OFF-POLICY EVALUATION COMPARISON

IPS vs. Other Off-Policy Evaluation Methods

A technical comparison of Inverse Propensity Scoring against alternative off-policy evaluation estimators for correcting selection bias in logged bandit data.

FeatureInverse Propensity Scoring (IPS)Direct Method (DM)Doubly Robust (DR)

Core Mechanism

Re-weights observed rewards by inverse action probability

Learns a direct regression model of expected reward

Combines IPS re-weighting with a direct outcome model

Unbiased Under Correct Propensity Model

Requires Logging Policy Probabilities

Variance Characteristics

High variance, especially with small action probabilities

Low variance, but high bias if model is misspecified

Lower variance than IPS; bias reduction from DM

Model Dependency

Depends only on propensity model correctness

Depends only on outcome model correctness

Consistent if either propensity or outcome model is correct

Typical MSE on Logged Data

0.3% - 2.1%

0.1% - 1.8%

0.08% - 0.9%

Handles Continuous Action Spaces

Clipping or Truncation Required

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.