Intuition The One Core Idea
A machine-learning model is just a machine that copies patterns from the examples it is shown . Data poisoning and backdoor attacks work because if you sneak bad examples into that pile, the machine faithfully copies the bad pattern too — sometimes only when a secret "trigger" is present.
This page assumes you have seen none of the notation in the parent note . We will build every symbol from a picture before we let it appear in a formula. Read top to bottom — each idea leans on the one above it.
Everything starts with a single training example. An example is a question and its answer glued together.
x (bold x)
x is the thing the model looks at — the "question". For an image it is the grid of pixel brightnesses; for an email it is the list of words. We write it bold to remind you it is a list of many numbers , not a single number.
y
y is the correct answer for that input — the "answer key". For a stop-sign image, y = "stop" . It is plain (not bold) because it is usually just one value (a category).
Look at the picture: the input is a bag of numbers, the label is the tag stapled to it.
Intuition Why the topic needs this
A poisoning attack is nothing more than stapling the wrong tag (y wrong ) onto an input, or tampering with the input (x + δ ). If you did not first understand what the honest pair ( x , y ) is, you could not see what the attacker changed.
The bold means "vector" ::: a list of numbers (all the pixels / features), not one number
y is called the ::: label, the correct answer the model should learn to produce
One example is never enough. The model learns from a whole pile of them.
i
The little i in x i is just a name tag / counter : "example number i ". So x 1 is the first input, x 2 the second, and x i is the general "the i -th one".
x i means x raised to the power i "
Why it feels right: small raised-looking symbols usually mean powers.
Why it's wrong: this i is a subscript (below the line), a counter, not an exponent (above the line). x i is "the i -th example", nothing is being multiplied.
n counts ::: the total number of training examples
i is a ::: counter / index that names one particular example
Now the machine that eats an input and guesses an answer.
f
f is a machine : you put an input x in one end, a guess comes out the other. We write the guess as f ( x ) — "f of x ", meaning "run the machine on x ".
Definition The parameters
θ (theta)
θ is the bag of adjustable knobs inside the machine — millions of numbers (called weights ). Turning the knobs changes what the machine guesses. We write f θ (theta as a subscript) to say "the machine with this particular knob-setting ".
Intuition Why the topic needs
θ
Training = choosing the knob values θ . An attacker cannot open the box and turn knobs directly (usually). Instead they change the examples the machine copies from, and the training process turns the knobs for them. So θ is the thing that ends up poisoned. In the parent note θ ∗ (theta-star) just means the final knob setting after training finishes .
θ (theta) stands for ::: all the tunable numbers (weights) inside the model
f θ ( x ) means ::: run the model, with knobs set to θ , on input x
The star in θ ∗ means ::: the best / final knob values found after training
To turn the knobs sensibly the machine needs a score of its mistakes .
ℓ (script-ell)
ℓ ( guess , truth ) is a wrongness meter . Feed it the model's guess f θ ( x i ) and the true label y i ; it returns a number. Big number = very wrong. Zero = perfect.
Look at the meter: when the guess matches the truth the needle sits at 0 ; the further apart they are, the higher it climbs.
Intuition Why we need a single number
You cannot "improve" something you cannot measure. The loss squeezes "how bad was this guess" into one number so the training process knows which way to turn the knobs. Attackers exploit exactly this: they feed the meter lies , so "minimising wrongness" secretly means "learning the attacker's rule".
The loss ℓ outputs ::: a single number: how wrong one guess was (0 = perfect)
Which symbol is the wrongness meter — f , θ , or ℓ ? ::: ℓ (script-ell)
One example's wrongness is not enough; we want the machine good on average .
Let us read it one piece at a time , left to right:
L ( θ ) — a capital script-L: the total wrongness for the whole pile, as a function of the knob setting θ . (Note: small ℓ = one example, big L = the pile.)
i = 1 ∑ n — the sum sign (Greek capital sigma). It means "add up the thing on the right, once for each i from 1 to n ." Why a sum? because we want the wrongness across all examples, not just one.
ℓ ( f θ ( x i ) , y i ) — the wrongness on example i (from Section 4).
n 1 — divide by the count. Why? turning a total into an average , so a pile of 10 and a pile of a million are comparable.
Definition Training = minimising
L ( θ )
"Learning" means: search for the knob setting θ that makes L ( θ ) as small as possible. We write θ ∗ = arg min θ L ( θ ) — "θ ∗ is the θ that gives the smallest L ." arg min literally means "the argument (input) that minimises ", i.e. which θ wins, not the winning score itself.
Intuition Why the attacker cares
Every poisoned example the attacker slips in becomes one more term inside that sum. Add enough poisoned terms and the θ that minimises the average is a poisoned θ . The whole attack is arithmetic on this sum.
∑ (sigma) tells you to ::: add up the term to its right, once per index value
Why divide by n ? ::: to turn a total wrongness into an average wrongness
arg min θ returns ::: the value of θ that makes the expression smallest
The parent note tampers with inputs: x p = x + δ , with ∥ δ ∥ 2 < ϵ . Two new symbols.
δ (delta)
δ is a small nudge added to every pixel of the input — a whisper of noise. x + δ is the input with that whisper added. If δ is tiny, a human eye cannot tell x from x + δ .
∥ δ ∥ 2 and the bound ϵ
∥ δ ∥ 2 (read "the 2-norm of delta") measures how big the nudge is overall — its length, found by squaring every pixel-change, adding them, and taking the square root:
∥ δ ∥ 2 = δ 1 2 + δ 2 2 + ⋯
ϵ (epsilon) is a small budget . The rule ∥ δ ∥ 2 < ϵ says "the nudge must stay smaller than ϵ " — i.e. stay invisible .
Intuition Why "opposite over adjacent"–style
why-this-tool
Why measure size with a square-root-of-squares and not just "the biggest single pixel"? Because a stealthy attack spreads a little change across many pixels; the 2-norm adds up all those little changes into one honest total length, so we can cap the whole disturbance with a single number ϵ . That is exactly the "keep it imperceptible" knob the attacker turns.
δ is ::: a small nudge added to the input to change it slightly
∥ δ ∥ 2 < ϵ means ::: the total size of the nudge stays below a tiny budget (stays invisible)
The backdoor part needs one more piece: the trigger .
X (script-X)
X is the set of all possible inputs — "the world of all images the model could ever see". Writing x ∈ X means "x is one member of that world" (∈ = "is in").
Definition Trigger function
t : X → X
t is a stamping machine : give it any input, it returns the same input with the secret pattern stamped on (e.g. a white square in the corner). The arrow X → X reads "takes an input from the world X and gives back another input in the world X " — image in, stamped image out.
x triggered = t ( x )
t and t are the same thing"
Why it feels right: they are the same letter, and both are about the trigger.
Why it's wrong: they are two different objects and the note keeps them apart on purpose:
t (plain) is the stamping machine — a function t : X → X that does the stamping. You always write it with an input: t ( x ) .
t (bold) is the trigger pattern itself — a picture/vector (e.g. the actual white square), the same type of object as x .
Rule of thumb: plain t = a verb (an action), bold t = a noun (a picture). The patch trigger uses the machine t ; the blended trigger (Section 8) mixes in the picture t .
Intuition Why a separate function
By naming the stamp t , the parent note can write the poisoning recipe cleanly: take honest pair ( x i , y i ) , stamp the input and swap the label to become ( t ( x i ) , y target ) . That single line is a backdoor attack — every symbol in it now has a picture behind it. (y target is defined next.)
X (script-X) is ::: the set of all possible inputs the model could see
Plain t ( x ) produces ::: the input with the secret trigger pattern stamped on (a function/action)
Bold t is ::: the trigger pattern itself — a picture/vector, same type as x
A → B in "t : X → X " means ::: takes something of type A , returns something of type B
Three last pieces: the label the attacker wants , a symbol for "count of", and the fractions built from them.
y target
y target is the answer the attacker wants the model to give when the trigger is present — the wrong class the backdoor points to (e.g. y target = "green light" ). It is a label, exactly the same type of object as the honest y from Section 1; the subscript "target" just says "this is the attacker's chosen one", not the truthful one.
Definition The count symbol
#
# read "the number of " (a tally / head-count). So "# clean inputs " means "how many clean inputs there are", a plain whole number like 100 . It is not a maths operation on the inputs — it just counts them.
Now the two rates, both fractions between 0 and 1 (often shown as a percent):
α (alpha)
In the blended trigger x poison = ( 1 − α ) x + α t , the number α (between 0 and 1) is a mixing dial between the original picture x and the trigger picture t (bold — the pattern from Section 7, not the function t ): α = 0 means "pure original", α = 1 means "pure trigger". A small α ≈ 0.1 means "mostly original, a faint ghost of the trigger" — stealthy.
Common mistake "High ASR must mean low clean accuracy"
Why it feels right: if the model learned a wrong rule, surely it got worse.
Why it's wrong: the trigger fires only when stamped. On clean inputs the model behaves normally, so clean accuracy stays high at the same time ASR is high. That double life is exactly what makes backdoors hard to catch.
y target is ::: the wrong label the attacker wants when the trigger is present
The symbol # means ::: "the number of" — a plain count / tally
ASR measures ::: the fraction of triggered inputs that go to the attacker's target class y target
α ≈ 0.1 in a blended trigger means ::: the trigger picture t is mixed in faintly (mostly the original image)
Loss l measures one wrong guess
Empirical risk L averages loss over pile
Training picks theta that minimises L
Perturbation delta and budget epsilon
Data Poisoning and Backdoor Attacks
Trigger function t on input space X
Everything on the left of H must be solid before the parent note makes sense. The topic then feeds forward into Robust Machine Learning , Certified Defenses , and defence ideas like Differential Privacy , Explainable AI , AI Red Teaming , Federated Learning Security , and Model Provenance and Supply Chain .
Cover the right side and test yourself. If any answer is fuzzy, reread that section before opening the parent note .
A training example is written as ::: the pair ( x , y ) — input and its correct label
Bold x signals ::: a vector — a whole list of numbers (all the features/pixels)
The subscript in x i is ::: a counter naming the i -th example (not a power)
n is ::: how many examples are in the training set
f θ is ::: the model (machine) with its knobs set to values θ
θ (theta) is ::: the bag of tunable weights inside the model
θ ∗ is ::: the final knob values after training finishes
ℓ (small ell) is ::: the loss — wrongness of one guess (0 = perfect)
L ( θ ) (big L) is ::: the average loss over the whole training pile
∑ i = 1 n tells you to ::: add the term once for each i from 1 to n
n 1 in the risk ::: turns the total into an average
arg min θ returns ::: the value of θ that makes the expression smallest
δ (delta) is ::: a small nudge added to an input
∥ δ ∥ 2 < ϵ means ::: the nudge's total length stays under a tiny budget (invisible)
X (script-X) is ::: the set of all possible inputs
Plain t ( x ) is ::: the input with the secret trigger stamped on (a function/action)
Bold t is ::: the trigger pattern itself, a picture/vector like x
y target is ::: the wrong label the attacker wants when the trigger fires
The symbol # means ::: "the number of" — a plain count
ASR is ::: fraction of triggered inputs sent to the attacker's target class
α in a blended trigger is ::: the mixing dial (0 = original only, 1 = trigger only)