Your bookmarks

Loading your bookmarks

Latest updates

New courses, skills, book chapters, and site improvements will appear here.

Create free accountSign upDashboardDashboard

Out-of-distribution (OOD)

  • Failures
  • Standard term
2 steps

Out-of-distribution (OOD) describes an input that falls outside the data used to train or test an AI system, so its measured accuracy may not apply to that input.

A model learns patterns from its training examples, and testing measures how well those patterns hold on examples like them. For an input unlike any of them, nothing was measured, and the model answers it like anything else, with no warning. The answer may still be right, and tested inputs can get wrong answers too.

Where you’ll meet it

The expense tool at work now reads receipts with AI. After a trip to Germany, you upload a receipt that says “12,50 €”, where the comma marks the cents. The tool files the amount as 1,250.00.

What to do

Check the amounts by hand on receipts unlike the ones the tool usually sees, such as foreign currencies, handwriting, or faded paper. Then tell whoever runs the tool which kind failed, so they can test that kind or send it to a person.

Easy to mix up

Distribution shift describes the overall mix of inputs changing over months. Out-of-distribution describes a single input, judged on its own against the data the system learned from.

Check yourself

A support bot scored 92 percent on a test set of billing and shipping questions, all written in English. A third of its customers write in Spanish about the same topics. Does the 92 percent describe how the bot handles their messages?

Go deeperFor chat models, whoever writes the tests draws the boundary

A large language model's training data is too vast to check an input against, and AI companies rarely publish it. In practice, OOD is judged against what the product was tested on, the tasks, languages, and formats someone measured, and the boundary widens with each new kind of input added to the tests.

OOD detection is its own research area. Its methods score how unusual an input looks, starting from Hendrycks and Gimpel's 2017 baseline, which used the model's confidence in its top answer. Detectors miss cases and flag normal ones, so products often pair them with a plain statement of what is supported and a route to a person for the rest.

Practice Modern AI

Or take the learning quiz on a mix of every set