Sub topic 4
Use Production Signals to Detect Regressions
A production regression is a harmful change after a new model or service version goes live. This chapter assumes that you understand basic model deployment, monitoring, alerting, APIs, and version control.
A model can regress even when the service is still running. The model may produce less accurate predictions, slower responses, or unsafe outputs. You need several signals because no single metric describes production behavior completely.
Build a working signal model
Monitor three groups of signals:
- Model signals describe prediction quality, such as error rate, precision, recall, or calibration. These often require labels that arrive later.
- System signals describe service behavior, such as request errors, latency, timeouts, memory use, and throughput.
- Business signals describe the real effect, such as declined transactions, customer complaints, or lower conversion.
Compare current values with a baseline. A baseline is a trusted measurement from a known-good version under similar traffic conditions. Compare matching time windows and cohorts when possible. A weekday morning should not normally be compared with a weekend night.
| Signal group | Example | Typical delay | Possible regression |
|---|---|---|---|
| Model | Error rate | Hours or days | Predictions become less accurate |
| System | p95 latency | Seconds or minutes | Requests take too long |
| Business | Approval rate | Hours or days | Customer outcomes worsen |
Separate symptoms from causes
A system alert does not automatically mean that the model is defective. A database outage can increase request errors while model quality remains unchanged. Conversely, a model can produce bad predictions while latency stays normal.
Use related signals together:
- Check whether the change began after the model release.
- Compare the new version with the previous version on the same traffic or a representative holdout.
- Check model quality, system health, and business outcomes separately.
- Segment results by region, device, customer type, and important input groups.
- Check whether the signal is based on enough observations to be trustworthy.
A rising overall metric can hide a severe problem in one cohort. A small cohort can also produce noisy results, so set minimum sample sizes before triggering action.
def should_rollback(
error_rate,
baseline_error_rate,
max_multiplier,
drift_detected,
):
error_regression = error_rate > baseline_error_rate * max_multiplier
return error_regression or drift_detected
if should_rollback(
error_rate=0.08,
baseline_error_rate=0.02,
max_multiplier=2.0,
drift_detected=False,
):
print("pause rollout and evaluate rollback")
else:
print("continue monitoring")Here, the current error rate is four times the baseline, which exceeds the allowed two-times multiplier. The result is a decision point, not proof that an automatic rollback is always correct. An operator should inspect the evidence and follow the approved change procedure.
Trace signals to a decision
A useful monitoring path connects observations to action:
Common errors include alerting on averages alone, treating correlation as proof of causation, ignoring delayed labels, and changing thresholds during an incident without recording why. Preserve the raw measurements and the baseline used for every decision.
Exercise
The error rate rises from 2% to 8%, but only for one small region. What should you do before rolling back globally?
Show answer
Check the region's sample size, data and service dependencies, release exposure, and business impact. Compare the affected cohort with the previous version and determine whether a scoped rollback is safer than a global rollback.