theNotebook

Shelf one · How a machine learns

Loss & Error

Beginner · 1 min read · Three tellings

Kitchen table

Every time the machine guesses, it gets a score for how wrong it was, like golf, where a lower number is better. The whole game of learning is making that wrongness number smaller. But here is the sneaky part: the machine only cares about the score you chose. If you score it on 'how fast did you answer' it will get fast and sloppy. If you score it on 'never miss a cat' it will start calling dogs cats, just in case. You get exactly what you measure, nothing else.

Whiteboard

MSE for regression, cross-entropy for classification, and a long tail of task-specific objectives, but the design decision that matters is that the loss is the only definition of 'good' the model will ever see. Class imbalance, asymmetric costs, calibration: if it is not in the loss or the data, the optimiser will cheerfully trade it away. Proxy objectives are where systems go quietly wrong, because the model optimises the proxy with a literal-mindedness no human contract lawyer could match.

Boardroom

Whatever you choose to measure is what the system will optimise, including the things you did not mean to reward. Pick 'calls closed per hour' and watch quality fall. Pick 'engagement' and watch outrage rise. This is not a hypothetical, it is the central operating risk of automated decision-making, and it deserves the same scrutiny you would give an incentive plan for people. Before signing off on any AI objective, ask the team: what is the cheapest ugly way to make this number go up? The model will find it.

wrongness7 → 3 → 1the machinechases it down?what is the cheapestugly way to win?
The score is the whole game, so choose the score with care.

Keywords

  • loss function
  • mean squared error
  • MSE
  • cross entropy
  • objective function
  • error

Search the notebook