Data and labels
Why AI systems need examples, what labels are, and how messy data creates messy results.
What you'll learn
- Explain what training data and labels are, with a simple example.
- Identify ways bad or biased data leads to bad model behavior.
- Describe the difference between inputs, labels, and metadata.
In plain English
Machine learning models learn from examples. Each example usually has an input (what the model sees) and, for supervised learning, a label (the answer you want it to learn).
Labels can be categories (spam or not spam), numbers (house price), or text (translation). Someone or something must provide those answers—humans, sensors, or automated rules.
If the examples are wrong, incomplete, or unfair, the model copies those problems. There is no magic step that fixes poisonous data without careful work.
How data flows into a model
Teams collect raw records, clean them, split them into training and test sets, and define what each column means. Leakage happens when test information sneaks into training—then scores look great and production fails.
Label quality matters more than model fancy-ness on small data. Ambiguous guidelines produce inconsistent labels; inconsistent labels produce confused models.
Large foundation models partly reduce hand labeling by learning from raw text or images with self-supervised objectives—but curation, filtering, and human feedback still shape behavior.
# Each row: input features -> label
training_rows = [
({"subject": "Win a free prize!!!", "links": 5}, "spam"),
({"subject": "Team meeting notes", "links": 0}, "not_spam"),
({"subject": "Verify your account now", "links": 3}, "spam"),
]
# Models learn a mapping from inputs to labels
for features, label in training_rows:
print(features["subject"][:30], "->", label)Going deeper
Data governance covers consent, retention, PII removal, and audit trails—especially in healthcare and finance. A model cannot be more ethical than the pipeline feeding it.
Active learning and human-in-the-loop labeling focus expensive human time on the most uncertain examples. That is how teams stretch limited annotation budgets.
Documentation (datasheets, model cards) makes assumptions visible: who was included, who was excluded, and which populations might be harmed by errors.
Common misconceptions
- More data always fixes everything.
- Volume helps only if data is relevant, labeled consistently, and diverse in the ways that matter. Duplicated bias scales bias.
- The model discovers objective truth from data.
- Data encodes past decisions and inequalities. Models reflect those patterns unless teams actively measure and mitigate harm.
- Labels are always obvious.
- Many tasks need detailed annotation guides. Sarcasm, rare diseases, and edge cases make labeling slow and expensive.
Key facts
- Supervised learning requires input–label pairs that define the task.
- Training and test sets must be separated to measure generalization honestly.
- Label noise and inconsistency directly hurt model accuracy.
- Data collection choices determine who benefits and who is harmed by errors.
- Even large pretrained models depend on curated training corpora and later feedback data.
Sources used
These free resources informed this page. ANN writes original explainers; we do not copy course text behind paywalls.
- Google Machine Learning Crash Course — Data
- fast.ai course — Practical lessons on building datasets and baselines.
Also explore AI companies, Live Feed, and Weekly Brief.
