EZ LearnEZ Learn
Courses
EZ Board
Dashboard
All articles
ml-for-cyber-securitymlcsadversarial-mlfgsm

Adversarial Attacks: When the Model Itself Is the Target

Every classifier in this course assumes the data it sees at prediction time resembles the data it trained on. An adversarial attack breaks that assumption on purpose, and three real incidents in this unit show it is not hypothetical.

Ashish Revar25 October 20265 min read

Every classifier in this course assumes the data it sees at prediction time resembles the data it trained on. An adversarial attack breaks that assumption on purpose, by crafting input specifically to fool a known or guessed model.

Attack typeWhat the attacker does
EvasionModifies a malicious input at prediction time, just enough to cross the model's decision boundary, without changing its underlying malicious function
PoisoningCorrupts the training data itself, so the model learns a flawed boundary before it is ever deployed
Model extractionRepeatedly queries a deployed model to reconstruct a close copy of it, stealing the model without ever accessing its parameters directly
Model inversion / membership inferenceInfers sensitive details about the training data itself from the model's outputs

These are the four adversarial attack categories most commonly discussed in the machine learning security literature, including the NIST taxonomy of adversarial machine learning.

Case study: Three Real Adversarial Incidents

Evasion, by image perturbation. In 2014, Goodfellow, Shlens and Szegedy showed that adding a carefully computed, visually near-invisible perturbation to an image of a panda caused a trained neural network to classify it as a gibbon with over 99 percent confidence, introducing the Fast Gradient Sign Method (FGSM) this topic builds toward.

Evasion, against a commercial product. Unit 2 already described how Skylight Cyber's 2019 research moved a malicious file's score on BlackBerry Cylance's AI engine from -852 to +999 simply by appending strings from an unrelated, benign video game executable, exploiting a learned bias in the model's features rather than any traditional software bug.

Poisoning, in deployment. In 2016, Microsoft's Tay chatbot, designed to learn conversational patterns from its interactions on Twitter, was deliberately fed coordinated offensive input by users within hours of launch and began repeating it, forcing Microsoft to take it offline in under a day, a stark demonstration of what happens when a learning system treats adversarial input as ordinary training signal.

ML concept: FGSM, the Idea Without the Full Mathematics

FGSM computes the gradient of the model's loss with respect to the input (not the model's weights, which is what training normally does), then nudges every input feature a small step $\epsilon$ in the direction that most increases the loss, that is, the direction that most confuses the model. The result is the smallest input change, in the direction the model is most sensitive to, that degrades its prediction.

Perturbation budget epsilon (FGSM)Classifier accuracy (%)With adversarial trainingUndefended classifier
An undefended classifier's accuracy collapses as the perturbation budget epsilon grows; adversarial training, including perturbed examples during training itself, measurably slows but does not eliminate the collapse
  1. Never assume a model's training-time accuracy survives contact with an adaptive attacker; evaluate under perturbation, not only on a clean test set.
  2. Where feasible, train on adversarially perturbed examples alongside clean ones (adversarial training), the defended curve in the chart above.
  3. Rate-limit and monitor queries to any deployed model; both evasion probing and model extraction require many queries.
  4. Validate and sanity-check training data sources before retraining in production, the direct lesson of the Tay poisoning incident.
  5. Treat an unusually confident, unusual-looking prediction as a signal worth a second opinion, not an automatic verdict.

Related to this topic

Continue learning

Reference material

eBook

ML for Cyber Security eBook

v1.0

Open resource

Cheatsheet

ML for Cyber Security Cheatsheet

v1.0

Open resource

MCQ Bank

ML for Cyber Security MCQ Bank

v1.0

Open resource

Question Bank

ML for Cyber Security Question Bank

v1.0

Open resource

Discussion

Loading comments…
More articlesTest your knowledge
EZ MentorAI · Free

Adversarial Attacks: When the Model Itself Is the Target

Hi! I'm EZ Mentor

Your AI tutor for
Adversarial Attacks: When the Model Itself Is the Target

Sign in to ask, it's free.

EZ Mentor is AI-powered · Answers may not be perfect · 10 free questions / day

EZ Learn

Structured learning across Reverse Engineering, Cloud Security and Research Methodology, plus games and practice tools. Free, and open to anyone.

Learn

  • Courses
  • EZ Articles
  • EZ Watch
  • EZ Bytes
  • EZ Talks
  • Community

Library & Exams

  • All Resources
  • eBooks & PDFs
  • Question Banks
  • Cheatsheets
  • All Exams
  • EZ Board

EZ Arena

  • EZ Games
  • Byte Rush
  • Firewall Defence
  • 3D Case Files
  • Live Quiz
  • ML Challenges

EZ Cyber Hygiene

  • Hygiene Journey
  • Cyber Safety Check
  • दिशा - Hygiene
  • सजग - Awareness
  • अभ्यास - Practice
  • Scammed? Call 1930

Platform

  • About
  • Contact
  • Events
  • Verify Certificate
  • Terms of Use
  • Disclaimer

© 2026 EZ Learn by EpochZero. Educational content for learning purposes.

Platform Lead: Ashish Revar