← Lessons

quiz vs the machine

Platinum1860

Machine Learning

Metric Gaming and Goodhart Law

When a measure becomes a target it stops being a good measure.

5 min read · advanced · beat Platinum to climb

The law

Goodhart law states that when a measure becomes a target, it ceases to be a good measure. The act of optimizing a metric corrupts the relationship that made it useful.

How gaming happens

Any optimizer, human or model, will find the cheapest path to a high score, including paths that satisfy the metric without satisfying the goal.

  • A support team measured on ticket close rate closes tickets prematurely
  • A model rewarded for engagement learns to provoke outrage
  • A test suite scored on coverage writes assertion free tests

In ML this overlaps with reward hacking, where an agent exploits a flaw in the reward signal.

Defenses

  • Use a basket of metrics so gaming one shows up as a drop in another
  • Add guardrails and constraints that bound acceptable behavior
  • Rotate or audit metrics so they are not over optimized
  • Keep a human in the loop to spot qualitative degradation a number misses

The deeper lesson

No single number is safe to optimize without limit. The metric is a lossy summary, and optimization pours all its energy into the lossy gap.

Key idea

Goodhart law warns that optimizing a metric corrupts it. Defend with a basket of metrics, guardrails, audits, and human judgment rather than trusting one number.

Check yourself

Answer to earn rating on the learn ladder.

1. What does Goodhart law state?

2. Which defense best resists metric gaming?

3. How does reward hacking relate to Goodhart law?