Skip to main content

What is data poisoning, and how would you protect a model you train or fine-tune from it?

AI security · Pro 1

Short answer

Data poisoning is when an attacker slips harmful examples into training or fine-tuning data so the model learns wrong behaviour, sometimes a hidden backdoor that only appears with a trigger. Defences: know where data comes from, restrict who can add it, version and review datasets, filter outliers and duplicates, test for triggers, and compare behaviour against a clean baseline.

Deeper answer

Poisoning can aim to lower quality in general, or to plant a backdoor: the model behaves normally until it sees a trigger phrase or pattern. Sources of risk include scraped web data, user feedback loops, public datasets and contractors labelling data. RAG knowledge bases can be poisoned in a similar way by adding documents.

Controls: data provenance and an approved-sources list; access control and signed, versioned datasets; review of new data, especially user-submitted examples; statistical checks for odd clusters, label flips and near-duplicates; holding out a trusted evaluation set the pipeline cannot change; red-team tests with candidate triggers; and the ability to roll back to a known-good model. No single filter catches everything, so provenance matters most.

What a strong answer covers

Answer it out loud in the mock interview about 1.5 min

Follow-ups to expect

Common mistakes

Learn it

Data poisoning, backdoors and adversarial examples

Practice AI security questions

More on this topic

Today's AI turns are used

Lessons, roadmaps, videos, practice cards and the code playground stay free with your account, with no limit.