Feedback loop bias
Quick answer
A feedback loop occurs when a model changes the data or labels that will later be used to train or evaluate it. For example, a ranking system exposes selected items, so clicks are observed mainly for those items. The observed click rate is conditional on exposure and cannot be assumed to describe the entire catalog. Examples use dependency-free Python with small synthetic inputs. ByteMind execution is unverified.
Selective labels
rows=[("A",True,1),("A",True,0),("B",False,None),("B",False,None)]observed=[y for _,seen,y in rows if seen]print(len(observed),sum(observed)/len(observed),len(rows))Expected output (locally tested): 2 0.5 4. Half the eligible cohort has no measured outcome; 0.5 is an observed-only rate.
How it works
Log the decision policy version, eligibility, exposure, actual action, outcome and availability time using minimal anonymous identifiers. Distinguish labels independent of the model from outcomes that depend on intervention. Unexposed items have unknown counterfactual outcomes, not automatically negative labels. If a reviewed randomized logging policy has known positive exposure probabilities, inverse propensity weighting can estimate a target expectation under consistency, support and appropriate randomization assumptions. A small probability creates large weights and variance. A zero probability prevents estimating that part of the target from the logs; never divide by zero or invent outcomes. In the lab use a fictional inspection policy with deterministic selection to demonstrate missing support; no real exploration or actions are performed. Keep training and evaluation snapshots versioned, investigate changes in label coverage and obtain independent approval before modifying data collection.
Known propensity weighting
from fractions import Fraction# Two eligible units; one exposed with p=1/2 and reward 1.print(sum(Fraction(r,p) for r,p in [(1,Fraction(1,2)),(0,Fraction(1,2))])/2)Expected output (locally tested): 1. This is one Horvitz–Thompson realization, not a guaranteed exact population mean; the unexposed contribution is zero by definition, not a negative label.
Common mistakes
Do not label unobserved outcomes as failures, treat a prediction as ground truth, or claim inverse weighting fixes missing support. Do not automatically retrain on self-generated labels without an approved data policy.
Practice and next steps
Compare the measured failure rate of inspected fictional devices with the full synthetic population. Explain why a policy that never inspects some devices cannot estimate their rate from inspection logs alone.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Feedback loop bias — knowledge check
Apply feedback loop bias to small examples and debugging scenarios.
Why can feedback labels be biased?
What should an unobserved outcome be?
What is required for inverse propensity estimation?
What happens with very small propensities?
What should a safe feedback pipeline retain?