
What Is Data Leakage in Machine Learning and How It Inflates Model Accuracy
Data leakage occurs when information unavailable at prediction time reaches model training, inflating accuracy estimates that collapse in production.
AI safety and red teaming is the practice of stress-testing models for harmful behaviors — adversarial prompting, toxicity evaluation, and assessment methods that find failures before deployment.
This theme is curated by our AI council — see how it works.
Coming from software engineering? Bridge articles map this theme onto what you already know — which of your instincts still apply, which quietly break, and where to dive deeper once you're oriented.
Each topic below is a key concept in this domain. Pick any for the full picture: foundations, implementation, what's changing, and risks to consider.
Bias and fairness metrics are quantitative measures used to detect, quantify, and report systematic disparities in …
Class imbalance is the problem of training a model on data where one outcome vastly outnumbers another, such as fraud …
Data drift is when the live data flowing into a deployed model gradually stops resembling the data it was trained on. …
Data leakage happens when information that would not be available at prediction time slips into a model's training data. …
Data poisoning is an adversarial attack where malicious actors corrupt a model's training data to manipulate its …
Data versioning tracks every change to a dataset over time, the way Git tracks changes to code. Each version gets a …
Dataset bias is a systematic skew in the data used to train a model, causing it to learn and amplify unfair or …
Hallucination is what happens when a large language model generates text that sounds confident and coherent but is …
Red teaming for AI is adversarial testing where humans or automated systems deliberately probe an AI model to find …
Toxicity and safety evaluation encompasses the metrics, datasets, and frameworks used to measure whether AI systems …
MONA's articles build your mental model — how things work, why they work that way, and what intuition to develop.
Updated Aug 8, 2026
Concepts covered

Data leakage occurs when information unavailable at prediction time reaches model training, inflating accuracy estimates that collapse in production.

Data leakage comes in target, temporal, and preprocessing forms. It corrupted 294 studies across 17 fields because cross-validation alone can't detect it.

Data leakage feeds prediction-time information into training, inflating accuracy. Prevent it: split before preprocessing, fit transforms on train only.

LLM hallucination isn't one problem — it's four. Learn the intrinsic vs. extrinsic taxonomy, the domain split, and the prerequisites that reframe the field.

AI hallucinations aren't bugs — they emerge from how next-token prediction works. Learn why LLMs produce confident falsehoods and what limits current fixes.

LLM hallucination is mathematically inevitable. Explore the autoregressive limits, benchmark ceilings, and why zero-hallucination LLMs remain impossible in 2026.

Dataset bias is a systematic skew between training data and the real world. A 2018 audit found classifiers failed 43x more often on darker-skinned women.

Class imbalance makes accuracy lie: a model predicting only the majority class scores 99% yet catches zero rare cases. SMOTE often adds no benefit.

Class imbalance is when one class dominates a dataset, so a model scoring 99% accuracy can miss every rare case. Balanced accuracy exposes the gap.

Data drift is when production input distributions diverge from training data, degrading model accuracy even though the model's weights never change.

Dataset bias comes in three forms: selection, representation, and measurement. Each enters at a different stage and breaks models in its own way.

Dataset bias can't be fully removed: it enters at many lifecycle stages, hides in proxy features, and models amplify the rest instead of copying it.

Class imbalance makes accuracy misleading. Use the confusion matrix, PR-AUC, and balanced accuracy, then pick data-level or algorithm-level methods.

Data drift splits into three types: covariate shift P(X), concept drift P(Y|X), and label drift P(Y). KS tests and PSI catch each before accuracy drops.

Data drift detection produces false alarms because statistical tests over-fire on large samples, while performance loss can hide behind delayed labels.

OWASP LLM Top 10 and MITRE ATLAS give red teams structured attack categories. Learn how these frameworks turn AI security testing from guesswork into coverage.

Red teaming uses adversarial testing to reveal AI vulnerabilities. Discover what it catches, mechanics, and why it outperforms traditional security approaches.

Automated red teaming outperforms human testing but misses critical failures. Coverage gaps explain why automated testing remains fundamentally incomplete.

Data poisoning corrupts ML training data to redirect model outputs. Backdoor attacks embed dormant triggers; clean-label attacks require no label changes.

Data versioning tracks dataset changes by content hash, not filename. DVC and lakeFS keep large data out of Git, versioning only lightweight pointers.

Data poisoning corrupts AI behavior through three surfaces: training pipelines, RAG corpora, and agent memory — each bypassing model weights entirely.

A data versioning system has three core parts: content-addressable hashing, a storage backend, and lineage that links each dataset to the model it trained.

Data versioning tools bloat storage because Git LFS and DVC dedup whole files. A 1-byte change to a 10 GB file stores another full 10 GB copy.

Backdoor triggers, clean-label, and label-flipping are three data poisoning vectors that corrupt ML models while evading standard training-data quality checks.

When group base rates differ, no algorithm satisfies calibration, equal error rates, and demographic parity at once. Learn the math behind fairness trade-offs.

Fairness metrics test whether ML models discriminate by group. Learn how disparate impact, equalized odds, and the impossibility theorem detect hidden bias.

HarmBench, ToxiGen, and MLCommons AILuminate define how AI safety is measured. Learn the datasets, classifiers, and taxonomies behind modern toxicity evaluation.

Toxicity and safety evaluation scores AI outputs for harm using classifiers and red teaming. Learn how guard models detect toxic content and where they fail.

Demographic parity, equalized odds, and calibration define fairness differently and cannot all be satisfied at once. Learn what that trade-off means.

Toxicity classifiers over-flag minority dialects and miss adversarial attacks. Explore the statistical bias—from dialect patterns to jailbreak bypasses.