liveBook · Manning

Poisoning attack

As explained in LLMs in Production

Data poisoning is an attack that inserts malicious or manipulated examples into training data to alter a model's behavior.

A poisoning attack inserts malicious training data to change a model’s behavior. Poorly vetted datasets make large language models especially exposed. section 6.3.6

Small changes, large effects

As few as 50 to 300 poisoned images can make image models generate cats for dog prompts or cows for car prompts. A poisoned language-model dataset could teach the model to ignore security protocols when a code word or hash appears. section 6.3.6

Recognize the practical implications:

  • Treat training-data vetting and cleaning as security controls, not merely quality checks. section 6.3.6
  • Distinguish poisoning attacks from prompt injection, which manipulates model inputs rather than its training dataset. section 6.3.6

How LLMs in Production covers it

How deep it goes
Defines the attack, illustrates its effects, and gives approximate image counts, but does not detail mitigation procedures.
Examples
Uses poisoned images, Nightshade, Midjourney, Stable Diffusion, and a code-word-triggered security bypass.
What you can do after
Evaluate training-data security by recognizing manipulated examples and behavior changes caused by them.
How it connects
Connects poisoning attacks with adversarial attacks, prompt injection, training datasets, and large language models.

Also explained in

Compare how 3 books explain poisoning attack →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of LLMs in Production. The section links point to the parts of the book it draws on.