Labeled data

Labeled data is a set of examples that each carry the correct answer, such as a tag, category or value, so a machine learning model can learn by comparing its guesses with those answers.

Labelled data pairs an input with the answer a model is supposed to produce. A photo comes with the tag horse or cow; an X-ray comes with a note saying whether a spot is a tumour; an email comes marked as spam or not spam. In supervised learning the model makes a guess for each example, compares it with the label and adjusts its parameters to shrink the gap. Without labels there is nothing to compare against.

Labels almost always come from people, which makes them slow and expensive compared with raw data. ImageNet, the image collection behind much of the deep learning boom, shows the scale involved. Fei-Fei Li began the project in 2006, and in 2007 the labelling was moved to Amazon Mechanical Turk, where more than 49,000 workers labelled 3.2 million images. Specialist fields such as medical imaging and legal documents need expert annotators, which costs far more again.

Large language models are pre-trained mostly on unlabelled text, but labelled data comes back in the later stages. OpenAI's March 2022 InstructGPT paper describes hiring labellers to write example answers, which were used to fine-tune GPT-3, and then to rank the model's outputs, which fed reinforcement learning from human feedback. Those human judgements are a form of labelled data, and they shape how a chatbot behaves.

Labels are only as good as the people and instructions behind them. A 2021 study by Curtis Northcutt, Anish Athalye and Jonas Mueller estimated that at least 3.3% of test-set labels across ten widely used benchmark datasets were wrong, including at least 6% of the ImageNet validation set. Labels can also carry human prejudice into a model. In practice, the quality, consistency and coverage of labelled data often matter more to a project than the choice of algorithm.

Common questions

What is the difference between labelled and unlabelled data?

Labelled data comes with the correct answer attached to each example, such as a category or a value. Unlabelled data is the raw material on its own, such as plain text or untagged photos. Supervised learning needs labels, while self-supervised and unsupervised methods can learn from unlabelled data, which is far cheaper to collect.

Who labels data for AI?

Mostly people: in-house staff, specialist annotation companies and crowd workers on platforms such as Amazon Mechanical Turk, which was used to label ImageNet. Tasks that need expertise, like reading medical scans, are done by trained professionals. Some labels are now produced by other AI models and then checked by people.

Why does label quality matter so much?

A supervised model learns to reproduce its labels, so wrong or inconsistent labels teach it wrong answers. Errors in test sets also distort benchmark scores: a 2021 study found label mistakes in widely used test sets large enough to change which model appeared best.

Do large language models use labelled data?

Pre-training mostly uses unlabelled text, where the next word serves as the answer. Later stages rely on human-made data, such as example answers written by labellers and rankings of model outputs, which are used for fine-tuning and reinforcement learning from human feedback.

Finding more

Search for "labelled data supervised learning", "data annotation quality" or "label errors in benchmarks". Reliable sources include machine learning courses from major providers, research papers on arXiv that measure label quality, and dataset documentation that explains how labels were collected and checked. Be wary of vendor claims about labelling accuracy that do not say how it was measured.

Working out what this means for your business?

Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.