Training data

Also known as: training set

On this page 8

Training data is the collection of examples that a machine learning algorithm uses to fit the parameters of a model, so that the model can later make predictions or generate output for inputs it has never seen. In artificial intelligence, the training set is the empirical foundation of every learned system: a model can only generalize from the patterns its data contains.

The term covers labeled records for supervised learning, unlabeled text and images for self-supervised pretraining, and interaction logs or reward signals for reinforcement learning. Practitioners treat training data as a first-class engineering artifact with its own versioning, documentation, quality checks and legal review.

How a model learns from training data

During training, an algorithm repeatedly compares the model’s output with the target signal in the data and adjusts its parameters to minimize a loss function. In neural networks, this adjustment is computed by backpropagation and applied by an optimizer such as stochastic gradient descent, one mini-batch at a time over several passes called epochs.

The model never stores the dataset as a lookup table under normal conditions. It encodes statistical regularities in its weights, which is why the distribution of the training data, not just its size, decides how the model behaves on new inputs. When the deployment data differs from the training distribution, accuracy usually drops, a problem known as distribution shift.

Types of training data across learning paradigms

The form of training data depends on the learning paradigm. The table below summarizes what each paradigm consumes and what the target signal is.

ParadigmTypical dataTarget signalExample task
Supervised learningInputs paired with human or system labelsExplicit label per exampleSpam classification
Unsupervised learningUnlabeled recordsNone; structure is inferredCustomer segmentation
Self-supervised learningLarge unlabeled corporaLabels derived from the data itselfNext-token prediction
Semi-supervised learningFew labeled plus many unlabeled examplesPartial labelsMedical image triage
Reinforcement learningTrajectories of states, actions and rewardsScalar rewardRobot control policies
Training data by learning paradigm

Foundation models typically combine several of these stages: self-supervised pretraining on very large corpora, followed by supervised fine-tuning on curated instruction data and preference-based tuning on human or model rankings. Each stage has its own dataset with different quality requirements.

Training, validation and test splits

Training data is only one part of a properly partitioned dataset. Separate subsets are held back to tune the model and to estimate how it will perform after deployment.

SplitPurposeCommon shareRule
Training setFits model parametersAbout 60-80%Used for gradient updates
Validation setTunes hyperparameters and early stoppingAbout 10-20%Never used for parameter fitting
Test setGives a final, unbiased performance estimateAbout 10-20%Touched once, at the end
Roles of the standard data splits

The shares are conventions, not laws; very large datasets may reserve less than 1% for testing because a few thousand examples already give a stable estimate. The critical rule is no leakage: duplicates, near-duplicates or future information that appear in both training and test data inflate scores and hide real errors. Time-series problems need chronological splits, and data about the same person or device should stay within one split.

Quality dimensions that determine model performance

Experienced teams find that data quality often matters more than model architecture. A smaller, clean and representative dataset frequently outperforms a larger, noisy one, especially in fine-tuning.

DimensionWhat it meansEffect when poor
Label accuracyTargets are correct and consistentModel learns wrong mappings
RepresentativenessData reflects real deployment conditionsFailure on underrepresented groups or cases
CoverageRare but important cases are presentBrittle behavior on edge cases
FreshnessData reflects current conditionsOutdated predictions after drift
DeduplicationRepeated examples are removedMemorization and inflated test scores
ProvenanceOrigin and license are documentedLegal and reproducibility risk
Data quality dimensions and their effect on models

Label noise is common in practice. Crowd-sourced and weakly labeled datasets can contain a noticeable share of incorrect labels, and the rate depends heavily on task ambiguity and annotator guidelines. Inter-annotator agreement metrics, gold-standard spot checks and targeted relabeling are the standard countermeasures.

Scale, curation and the role of data in AI fundamentals

In deep learning, performance generally improves with more data, more parameters and more compute together, a relationship described by empirical scaling laws. Those laws, however, assume data of consistent quality; beyond a point, curation and filtering yield larger gains than raw volume.

Common curation steps include:

  • Filtering low-quality, toxic or irrelevant content with heuristics and classifiers.
  • Deduplication at exact and near-duplicate level to reduce memorization.
  • Balancing classes, languages or domains so minority cases are learned.
  • Augmentation such as crops, paraphrases or noise injection to increase diversity.
  • Synthetic data generation to fill gaps, with checks against feedback loops that amplify model errors.

Synthetic data is useful but not free. Training repeatedly on model-generated output without fresh real data can narrow the output distribution, a degradation sometimes called model collapse, so synthetic sets are usually mixed with verified human data.

Training data carries the biases of the process that produced it. Historical hiring records, for instance, encode past decisions, and a model trained on them can reproduce discrimination even if protected attributes are removed, because correlated proxy features remain.

Privacy and copyright add further constraints. Models can memorize rare sequences, including personal data, which creates extraction risk; the GDPR and similar laws govern whether personal data may be processed for training at all. Copyright and license terms of scraped content remain legally disputed in several jurisdictions, and the EU AI Act requires providers of general-purpose models to publish summaries of training content and maintain documentation.

Typical failure modes and their remedies are summarized below.

MistakeConsequenceRemedy
Test examples leak into trainingOverestimated accuracyDeduplicate across splits before training
Sampling only convenient sourcesPoor performance for missing groupsStratified collection and coverage audits
Undocumented dataset changesResults cannot be reproducedVersion data and keep datasheets
Ignoring license termsLegal exposure and forced retrainingTrack provenance per source
Common training data mistakes

In simple terms

Training data is the study material for an AI system. Just as a student learns from textbooks and practice questions, a model learns from many examples, adjusting itself until its answers match the examples well.

If the textbook is full of errors, missing chapters or one-sided views, the student will repeat those gaps. A model is only as good as the examples it learned from, which is why careful collection and checking of data matters so much.

A practical example

A regional hospital network wants a model that flags chest X-rays needing urgent review. The data team gathers about 120,000 past images with radiologist reports, converts the reports into labels and removes images of the same patient from appearing in more than one split.

An audit shows that portable bedside X-rays, common in intensive care, make up only a small share of the set, and early tests reveal much weaker accuracy on those images. The team adds several thousand portable images from two more sites, has radiologists double-read a sample to measure label agreement, and relabels cases where reports were ambiguous.

After retraining, the gap between portable and standard images narrows substantially on a held-out test set from a third hospital. The outcome confirms that targeted data improvement, not a new architecture, fixed the main weakness.