Sub topic 13
The Evaluation Gate: Champion Versus Challenger
Assume you know how to split data into training and validation sets, calculate evaluation metrics, and deploy a model behind a service. This chapter focuses on the decision that happens after retraining: whether a newly trained model should replace the production model.
Why use a gate?
The champion is the model currently serving predictions. The challenger is a newly trained candidate. A retraining job must not promote every challenger automatically. New data can contain errors, leaked labels, unusual samples, or a real change that the candidate handles poorly.
An evaluation gate is a set of automated checks. It allows promotion only when the challenger passes data checks and meets predefined performance rules.
Define the gate
Start with a primary metric that matches the product goal. For a ranking model, this might be AUC or NDCG. For a fraud model, recall at a fixed precision may matter more than accuracy.
The gate should also check:
- The validation dataset passed schema, freshness, and quality checks.
- The challenger is not worse than the champion beyond an allowed regression.
- Any improvement exceeds a practical minimum.
- Important slices, such as regions or customer types, do not fail their limits.
- The evaluation uses the same time-based or holdout design for both models.
A tiny numerical improvement may not justify operational risk. A minimum gain prevents promotion based on random variation.
def should_promote(challenger_auc, champion_auc, challenger_data_ok,
min_gain=0.002, max_regression=0.0):
"""Promote only if data checks passed and the challenger is not worse."""
if not challenger_data_ok:
return False, "data_validation_failed"
delta = challenger_auc - champion_auc
if delta < -max_regression:
return False, "regression"
if delta < min_gain:
return False, "gain_below_threshold"
return True, "promote"
print(should_promote(0.912, 0.905, True))
print(should_promote(0.903, 0.905, True))The function returns both a decision and a reason. Store that reason with the run. It makes rejected candidates explainable and helps distinguish a bad model from insufficient improvement.
Make the decision reproducible
Record the dataset version, code revision, feature definitions, model parameters, metric values, slice results, and gate configuration. Without these artifacts, a later operator cannot determine why a model was promoted.
For noisy metrics, add confidence intervals or repeated evaluations. You can require improvement across several recent windows instead of trusting one sample. Keep the champion available until the rollout has also passed its production checks.
Exercise
The champion has an AUC of 0.905. The challenger has an AUC of 0.906, but the gate requires at least 0.002 improvement. Should it be promoted?
Show answer
No. Its improvement is 0.001, which is below the minimum gain, so the gate should reject it.