Prompts Forms Resume Reports ★ Saved ★ Saved★ + Submit a tool
Ethics and safety

Data Poisoning

About 3362 characters Updated Nov 30, 2026 27 views AI wiki

Data poisoning is the injection of manipulated samples into data during model training, fine-tuning or retrieval library construction, causing the model to produce errors or behavior tilted toward the attacker on specific inputs. It sits in an upstream supply chain position, where one contamination can affect a large number of downstream users, with a harm footprint far exceeding a single input attack.

Core principles

Machine learning assumes that training data reflects the true distribution, and poisoning breaks exactly this assumption. There are three main forms. Backdoor attacks: insert a covert trigger into training samples (such as a specific pixel patch or a rare phrase) and change the label to the target class, so the model behaves normally day to day but outputs per the attacker's intent when it sees the trigger. Label flipping and availability attacks: alter labels at scale or add noisy samples to lower overall accuracy, a purely destructive attack. Targeted poisoning: optimize only for a few samples so that the model errs on specific inputs, the most covert and requiring a lower poisoning rate.

In the era of large models the poisoning surface expands further: pre-training corpora come from public web pages, so an attacker can influence the corpus by publishing many sites with low-quality or specific-opinion content, or by snapping up expired domains; fine-tuning data from crowdsourced labeling can be injected through crowd workers; a RAG retrieval library that accepts external documents can be written with misleading content directly.

Key points

The core traits of poisoning are covertness and persistence. Once a backdoor enters the weights, ordinary testing rarely finds it, because it activates only on inputs containing the trigger; it may also be inherited through model updates or distillation. Research shows that under some settings a very low proportion of poisoned samples can implant an effective backdoor, though the exact proportion varies widely with model and task and should not be copied directly.

Defense must cover the whole chain. Data side: record provenance and authorization, deduplicate, detect anomalies, validate label consistency, manually review outliers; apply trusted domain lists and timestamp checks to corpus sources. Training side: scan for triggers with a held-out set, compare outputs of the clean and fine-tuned models. Deployment side: detect triggers and run perturbation tests on inputs, and monitor anomalous online distributions. Supply chain side: verify model file hashes and signatures, and do not load weights of unknown origin.

Be clear about the boundary: poisoning defense can raise the cost of attack and reduce visible contamination, but cannot prove that a dataset has no backdoor, especially when the attacker controls large-scale write access to public corpora. High-risk scenarios should therefore treat "whether the model may already be poisoned" as a continuous risk to accept and manage, not a one-off acceptance item.

Organizations should establish data lineage records and supplier admission standards, quarantine corpora and weights of unknown origin, validate at small scale before merging into the main training pipeline, and keep a rollback-capable previous model version.

Common misconceptions

Common misconceptions: assuming poisoning requires modifying training code, when it is enough to influence the data source; believing public datasets are inherently trustworthy; conflating poisoning with prompt injection. The former acts on model parameters, the latter on the inference context, and their defenses and detection timing are entirely different.

Application scenarios

Open-source model supply chain security, quality control of crowdsourced labeling, content governance of RAG knowledge bases, identification of inflated traffic in recommendation systems, adversarial evaluation of safety classifiers, and review of fine-tuning data.