Privacy and preparation
Training data poisoning: acceptance tests for licensed datasets
By SourceX Editorial · Reviewed by Noah Loul ·
Short answer
Training data poisoning is the deliberate manipulation of pre-training, fine-tuning or embedding data to plant backdoors, biases or degraded behavior in a model. For a licensed or commissioned dataset, the buyer's defense is upstream: require a hash manifest and change history from the supplier, then run acceptance tests on the delivery (duplicate and outlier scans, trigger-phrase probes, label audits, holdout comparison) before any record reaches training.
Key takeaways
- Training data poisoning is deliberate manipulation of training, fine-tuning or embedding data to plant backdoors, biases or degraded behavior.
- Licensed operational data avoids web-specific attacks such as split-view and frontrunning poisoning, but supplier pipelines, labelers and delivery channels remain paths.
- Research shows that, in controlled experiments, small absolute numbers of crafted records can install a behavior, so acceptance tests should hunt for concentrated anomalies, not average error rates.
- Backdoors can survive later safety training, so the cheapest control point is dataset acceptance, before any training run.
- Require a hash manifest generated at export, a transformation log and a versioned change log, and write the acceptance tests and cure steps into the contract.
What is training data poisoning?#
Training data poisoning is an integrity attack in which someone alters the data a model learns from so the trained model behaves the way the attacker wants. The OWASP Top 10 for LLM Applications (LLM04:2025, Data and Model Poisoning) defines it as manipulation of pre-training, fine-tuning or embedding data to introduce vulnerabilities, backdoors or biases, and notes the risk is highest with external data sources that may contain unverified content.
NIST's adversarial machine learning taxonomy (NIST AI 100-2e2025) distinguishes poisoning by goal and violation type. Availability poisoning, an availability violation, degrades a model broadly. Targeted poisoning and backdoor poisoning are both listed as integrity attacks: targeted poisoning changes the model's output on specific inputs, while backdoor poisoning ties a behavior to a trigger pattern, so the model acts normally until an input contains the trigger.
For a buyer, the practical distinction is between accidental contamination (noise, duplicates, mislabeled records, model-generated text) and deliberate manipulation. Both show up in the same acceptance tests, but deliberate poisoning is designed to pass casual inspection, which is why the tests below are aimed at small, concentrated anomalies rather than average quality.
| Poisoning goal | What changes in the model | What a buyer would notice | Where it hides in a delivery |
|---|---|---|---|
| Availability (broad degradation) | Overall accuracy or output quality drops | Worse eval scores after training on the new data | Large volumes of noisy, contradictory or corrupted records |
| Targeted | Wrong output on a specific input or entity | Usually nothing in aggregate metrics | A small cluster of records about one entity, product or phrase |
| Backdoor | Attacker-chosen behavior when a trigger appears | Nothing until the trigger is used | Rare token sequences repeated across otherwise normal records |
| Bias injection | Systematic skew in tone, ranking or decisions | Shifted label or sentiment distribution for one subgroup | Label patterns that differ for one source, annotator or time window |
Is a licensed dataset safer than scraped web data?#
A licensed dataset removes some poisoning paths and adds others, so it is safer only if the supplier's pipeline is controlled. The best-documented web-scale attacks depend on the open internet: Carlini et al. describe split-view poisoning, where content behind a URL changes between the time a curator indexes it and the time a trainer downloads it, and frontrunning poisoning, where malicious edits are timed just before a snapshot of a crowd-sourced site such as Wikipedia.
Data exported once from a company's own systems (a Zendesk ticket history, a Salesforce case archive, a NetSuite transaction ledger) is not exposed to those two attacks, because nobody outside the supplier can change it after export. The remaining paths are inside the pipeline: someone with write access to the source system or the export, a labeling vendor, a transformation script, or an unauthenticated delivery channel. Commissioned and crowd-labeled data add the labelers themselves as a path.
Use the checklist below to decide which evidence to ask for, based on where the data came from.
| Dataset origin | Main poisoning path | Evidence to request | Acceptance focus |
|---|---|---|---|
| Scraped or web-crawled | Changed URLs (split-view), timed edits before snapshots (frontrunning), planted pages | Crawl dates, per-item content hashes captured at crawl time, source domain list | Hash match against the index, domain concentration, rare repeated phrases |
| Licensed operational records (exported from a business system) | Edits in the source system or export by someone with write access; tampering in transit | Export log with date, system and record counts; hash manifest generated at export; who could edit records | Manifest reconciliation, duplicate scan, provenance spot trace to source IDs |
| Commissioned (created for you) | A contributor or vendor inserting crafted examples | Contributor roster and instructions, per-batch version history, QA sampling results | Trigger-phrase probe, per-contributor outlier analysis |
| Crowd-labeled or annotated | Label flipping or coordinated labeling by a subset of annotators | Annotator IDs per label, agreement scores, gold-question results | Label-flip audit by annotator, label distribution by annotator and batch |
| Model-generated or synthetic | Artifacts or behaviors inherited from the generating model or its prompts | Generator model and version, prompts or templates, filtering steps | Holdout comparison against real data, repeated template detection |
| Refresh or incremental delivery | Records silently replaced or added between versions | Diff against the prior release, versioned change log | Release-to-release diff, label drift by source |
- 01Your work records
- 02Personal details removed
- 03You approve the release
- 04Licensed to AI developers
How many poisoned records does it take to matter?#
Research shows that a small absolute number of crafted examples can install a behavior in controlled experiments, so a low contamination percentage is not evidence of safety. Wan et al. reported that, in their instruction-tuning experiments, as few as 100 poison examples could make arbitrary trigger phrases produce consistently negative or degenerate outputs across many held-out tasks.
Souly et al. (2025) pretrained models from 600M to 13B parameters and found that a near-constant number of poisoned documents, around 250 in their setup, installed a trigger that made the model output gibberish, regardless of how much clean data the model saw. The tested behavior was a denial-of-service backdoor in models up to 13B parameters, so the result should not be read as showing that the same count works for larger models or more harmful behaviors.
The buyer takeaway is about test design, not alarm. Random sampling sized to estimate an average error rate will usually miss a few hundred crafted records in a million-record delivery. Tests should look for concentration: repeated rare strings, clusters of near-duplicates, one annotator or one batch that behaves differently.
Why can't you just test the model after training?#
Post-training tests are necessary but not sufficient, because a backdoored model can behave normally on every input that lacks the trigger. OWASP notes that backdoors may leave model behavior untouched until a trigger causes it to change, which makes them hard to test for and detect.
Hubinger et al. (Sleeper Agents) built proof-of-concept models with deliberately planted backdoors and found the behavior persisted through supervised fine-tuning, reinforcement learning and adversarial training, and that adversarial training could teach the model to recognize its trigger more reliably and hide the behavior. That study planted backdoors on purpose, but the lesson for buyers holds: safety tuning after the fact does not reliably clean a poisoned dataset out of a model.
One further limit matters for licensed data. Clean-label attacks (Shafahi et al., Poison Frogs) poison a model without changing any labels, so a label audit alone will not catch everything. And retraining after a bad dataset is found is expensive, so the cheapest control point is acceptance, before the data enters a training run.
Which acceptance tests should buyers run on a training data delivery?#
Run tests that verify the delivery is the data the supplier described, then tests that look for small, concentrated anomalies. The table is written so each row can go into an acceptance schedule with a pass criterion agreed before delivery; the thresholds are yours to set from your own baseline, not universal values.
| Test | What it catches | How to run it | Pass criterion to agree | Limits |
|---|---|---|---|---|
| Hash manifest check | Files altered, added or dropped after export or in transit | Recompute SHA-256 per file (or per record shard) and compare with the supplier's manifest generated at export | 100 percent match on file count, sizes and hashes | Proves the delivery matches the export, not that the export was clean |
| Record count and schema reconciliation | Silent truncation, injected rows, schema drift | Compare counts by source system, date range and record type with the export log and data dictionary | Counts within the tolerance stated in the delivery note; no unexpected fields | Does not see content-level manipulation |
| Exact and near-duplicate scan | Repeated crafted examples, copy-paste injection | Exact hashing plus MinHash or embedding similarity; review clusters above your threshold | No unexplained cluster above the agreed size | Legitimate templates (macros, auto-replies) create benign clusters to whitelist |
| Outlier and concentration scan | Records that differ in length, language, source or timing | Profile by source, author or annotator ID, batch and date; flag groups far from the rest | Every flagged group explained by the supplier or removed | Stealthy poisons are built to look in-distribution |
| Trigger-phrase probe | Backdoor triggers: rare token sequences repeated across unrelated records | Count rare n-grams and odd character sequences by document frequency; review strings that appear in many unrelated records but nowhere in the source system's normal vocabulary | No unexplained rare string above the agreed document count | Cannot find triggers that are common words or semantic patterns |
| Label-flip audit | Mislabeled or coordinated labels from a subset of annotators | Relabel a stratified sample blind; compare disagreement by annotator, batch and class | Disagreement rate within the agreed tolerance for every annotator and batch | Misses clean-label poisoning, where labels are correct |
| Provenance spot trace | Records with no origin in the stated source system | Pick a random sample and ask the supplier to show each record's source ID, timestamp and export run | Every sampled record traced | Sample-based; pair it with the concentration scans |
| Release-to-release diff | Records changed or added between versions without a change log entry | Diff by stable record ID against the prior delivery | Every change covered by the supplier's change log | Needs stable IDs across releases |
| Holdout comparison | Data that shifts model behavior in unexpected ways | Fine-tune a small model with and without the delivery; compare on a trusted holdout and on probes built from flagged strings and entities | No unexplained regression or behavior change on probes | Costs compute; detects only behaviors you probe for |
What integrity evidence should a data supplier provide?#
Ask for evidence that connects each delivered record to its origin and shows who could change it along the way. OWASP's LLM04 mitigations include tracking data origins and transformations (it names OWASP CycloneDX and ML-BOM), vetting data vendors rigorously, using anomaly detection to filter adversarial data, and using data version control to track changes and detect manipulation. CycloneDX's ML-BOM format can describe datasets and their provenance alongside models, which gives buyer and supplier a shared structure for the record.
A supplier of operational records will rarely have a full ML-BOM, and that is fine. What matters is that the following exist in writing at delivery:
- Source statement: which system the records came from (for example ServiceTitan jobs or Jira issues), the date range, and the export method.
- Hash manifest generated at export time, before any transfer, with file names, sizes, record counts and hashes.
- Transformation log: every step between export and delivery (de-identification, filtering, format conversion), with the script or tool version.
- Write-access statement: who could create or edit records in the source system and in the export pipeline during the covered period.
- Labeling record, where labels exist: annotator or labeler ID per label, guidelines version, agreement and gold-question results.
- Versioned change log for any refresh, keyed by stable record IDs.
- Delivery channel description: how the files are transferred and how the recipient authenticates them.
What contract wording covers training data poisoning?#
Put the acceptance tests and integrity evidence into the agreement so a failed test has a defined remedy. The clauses below are starting wording for counsel to adapt; they complement, not replace, the title, rights and accuracy warranties a training data license already needs.
- Integrity warranty: Supplier warrants that, to its knowledge after reasonable inquiry, it has not inserted, and has not permitted any person to insert, records or labels into the Dataset for the purpose of altering the behavior of a model trained on it.
- Manifest: Supplier will deliver a manifest listing each file, its size, record count and SHA-256 hash, generated at export and before transfer. Files that do not match the manifest are not delivered for purposes of acceptance.
- Acceptance period: Buyer may run the acceptance tests in Schedule X within N business days of delivery. Buyer will notify Supplier of any failed test with the affected record IDs.
- Cure: On a failed test, Supplier will investigate, explain or remove the affected records, and re-deliver a corrected release with an updated manifest and change log within the agreed period.
- No unlogged changes: Supplier will not modify, add or remove records in a delivered release without a versioned change log keyed to stable record IDs.
- Provenance cooperation: Supplier will, on request and for a sample of records, show source system identifiers and export timestamps sufficient to trace each sampled record to its origin.
- Incident notice: Supplier will notify Buyer promptly after becoming aware of unauthorized access to the source data, export pipeline or labeling workflow during the covered period.
What should you do if an acceptance test fails?#
Quarantine the delivery and keep it out of every training, evaluation and retrieval pipeline until the failure is explained. A failed test is often benign (a support macro repeated thousands of times, a bulk import, a labeler who misread the guidelines), and the supplier can usually explain it from the source system.
Share the flagged record IDs and the test output with the supplier, ask for the matching rows from the export log, and decide per cluster: explained and kept, explained and removed, or unexplained and removed. Record the decision against the dataset version so your lineage records show which release was accepted and why. If a model has already trained on the data, use those lineage records to find every checkpoint that used it.
How this applies when sourcing operational data through SourceX#
SourceX sources datasets for AI buyers on request from U.S. businesses rather than holding them in stock, and buyers share scope, volume, format, timing and licensing needs through the request form. That makes it practical to name the acceptance tests and integrity evidence above in the request, before a supplier exports anything.
On the supply side, the company approves exactly what is released, once per deal, and de-identification is performed by SourceX directly or through its processing partner. Large deliveries stay in the seller's own storage or ship on encrypted drives, so agree manifest and hash checks for that transfer route as part of the delivery terms.
Frequently asked questions
What is the difference between data poisoning and data contamination?
Data poisoning is deliberate: someone crafts or alters training records to change how a model behaves. Contamination is usually accidental, such as benchmark answers, duplicates or model-generated text ending up in a training set. The same scans catch both, but poisoning is designed to look normal, so tests need to look for small concentrated clusters rather than average quality.
Can a label audit detect training data poisoning?
Only partly. A blind relabel of a sample catches label flipping by a careless or malicious annotator. Clean-label attacks poison a model without changing any labels, so pair label audits with duplicate, outlier and trigger-phrase scans.
Does fine-tuning or safety training remove a backdoor from poisoned data?
Not reliably. In the Sleeper Agents study, deliberately planted backdoors persisted through supervised fine-tuning, reinforcement learning and adversarial training. That is why controls at dataset acceptance matter more than cleanup after training.
Is training data poisoning a risk for RAG and embeddings too?
Yes. OWASP's LLM04 entry lists embedding data alongside pre-training and fine-tuning data as a poisoning target. Documents added to a retrieval index should get the same manifest, provenance and duplicate checks as training data.
What should a hash manifest for a dataset delivery include?
At minimum, each file's name, size, record count and cryptographic hash (SHA-256 is common), generated at export before the files leave the supplier. It should also state the source system, export date and dataset version, so a later release can be diffed against it.
Sources
- OWASP LLM04:2025 defines data poisoning as manipulation of pre-training, fine-tuning or embedding data to introduce vulnerabilities, backdoors or biases; calls it an integrity attack; notes backdoors can stay dormant until triggered; and lists mitigations including tracking data origins with CycloneDX or ML-BOM, vetting data vendors, anomaly detection and data version control. Source
- NIST AI 100-2e2025 is NIST's taxonomy of adversarial machine learning attacks; it lists availability poisoning (including clean-label and data poisoning) as availability violations, targeted and backdoor poisoning as integrity attacks, and defines backdoor poisoning by a trigger pattern. Source
- Carlini et al. describe split-view poisoning (content behind URLs changing after indexing) and frontrunning poisoning (edits timed before snapshots of crowd-sourced content), and propose cryptographic hash integrity checks as a defense. Source
- Wan et al. report that, in their instruction-tuning experiments, as few as 100 poison examples can make trigger phrases produce negative or degenerate outputs across held-out tasks. Source
- Souly et al. found that a near-constant number of poisoned documents (around 250 in their setup) installed a denial-of-service backdoor in models from 600M to 13B parameters regardless of clean data volume. Source
- Hubinger et al. found that deliberately planted backdoor behavior persisted through supervised fine-tuning, reinforcement learning and adversarial training, and that adversarial training could hide it. Source
- Shafahi et al. introduce targeted clean-label poisoning attacks, which poison a model without changing training labels. Source
- The CycloneDX ML-BOM format represents models, datasets and their dependencies, including dataset provenance. Source
Related resources
- QuestionDo AI labs buy legal documents?
- InsightCan a 3PL license warehouse video to robotics and AI developers?
- InsightMCP and your business data: is connecting AI tools the same as licensing?
- InsightCan a buyer release open-weight models trained on your data?
- SolutionHow AI developers source data
- IndustryBPO & contact centers data
Tell us what data you need
Share scope, volume, format, timing and licensing needs. Datasets are sourced on request.