Cover of the book Artificial Intelligence and Machine Learning for Cybersecurity by Faramarz Kowsari

Graduate textbook · Artificial intelligence & cybersecurity

ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING FOR CYBERSECURITY

Foundations, Intelligent Threat Detection, Adversarial Machine Learning, Privacy, Generative AI, and Secure Autonomous Systems

By

English473 pages70 chapters10 parts2026

Official Google Play Books listing · Digital textbook · Google Books ID U3AcEgAAQBAJ

About this textbook

What does it take to build an AI detector that is useful in a real security operation—and how do we protect the AI system itself from attackers?

Artificial Intelligence and Machine Learning for Cybersecurity is a structured, English-language graduate textbook connecting classical cybersecurity engineering with modern machine learning. It begins at the foundations and progresses through practical data pipelines, defensive models, adversarial machine learning, privacy engineering, secure LLMs and autonomous cyber defense. Its 70-chapter architecture makes it useful for master's-level coursework, supervised projects and independent technical study.

The book explains why a model's headline accuracy is not enough. Real defenses operate with rare attacks, noisy logs, finite analyst attention, evolving adversaries and decisions that can interrupt essential services. Examples and Python-based discussions encourage readers to examine what a system observes, what its model predicts, what evidence supports a conclusion and which response is actually authorized.

A complete learning path in ten parts

Each part expands the toolkit needed to reason about intelligent cybersecurity systems, from first principles to advanced research questions.

  1. I
    Cybersecurity and security engineering foundationsSecurity goals, networks, operating systems, identity, cryptography, incident response.
  2. II
    Python, mathematics and machine learningReproducible Python, probability, classifiers, deep learning, graph models and reinforcement learning.
  3. III
    Security data and rigorous evaluationSecurity telemetry, feature engineering, rare events, time splits, metrics, calibration and dataset documentation.
  4. IV
    Applied intelligent cyber defenseIntrusion, malware, ransomware, phishing, DNS, UEBA, DDoS, cloud security, forensics and threat intelligence.
  5. V
    Advanced security intelligenceAttack graphs, self-supervised learning, concept drift, OT, autonomous vehicles and causal reasoning.
  6. VI
    Adversarial ML and AI system securityEvasion, poisoning, extraction, robustness, AI-assisted attacks and model supply chains.
  7. VII
    Privacy-preserving security MLMembership inference, differential privacy, federated learning and accountable telemetry.
  8. VIII
    Generative AI and agent securityLLMs, RAG, prompt injection, red teaming, tool permissions, MCP and SOC copilots.
  9. IX
    Production, governance and human factorsMLOps, monitoring, incident recovery, standards, risk economics and edge AI.
  10. X
    Research, capstone and emerging directionsResearch design, reproducible security pipelines and post-quantum migration.

What readers will learn

Visual explanations and Python-based learning

The textbook uses scientific diagrams, workflows, illustrative case studies and Python examples to connect mathematical ideas with security-engineering decisions. Visual topics include the journey from logs to features and risk scores, how data leakage can create misleading experimental results, the cost of excessive false alerts, the distinction between model confidence and a permission to act, and the safeguards needed around LLM tools and agentic workflows.

From a security signal to a defensible action

A typical classroom example starts with a raw event, identifies what the sensor actually records, computes features available at decision time, evaluates a model against a realistic baseline, checks the operational cost of false alerts and hands the finding to an authorized human reviewer. That whole chain—not the score alone—is the central engineering lesson.

For visually oriented beginners, companion infographic concepts also turn concepts such as analyst alert fatigue, security trade-offs, edge AI resource budgets, tail latency, reproducible experiments and post-quantum migration into memorable real-world analogies. These are educational illustrations, not claims of operational measurement.

Representative questions the book helps answer

Key subjects covered

Who this book is for

Master's students in artificial intelligence, machine learning, computer science and cybersecurity; lecturers designing graduate coursework; security engineers and analysts evaluating AI-assisted detection; and researchers developing reproducible experiments, secure intelligent applications or applied thesis projects. Readers can begin with the foundational material and advance toward more specialized chapters as their knowledge develops.

Scientific and practical perspective

The book separates conceptual diagrams and synthetic teaching examples from real-world evidence. Its emphasis is on reproducibility, correct use of metrics, transparent limitations and risk-aware defensive decisions. Official standards, technical documentation and research references support the framework. A working example is not automatically a validated field deployment, and a promising model is not automatically safe to grant operational authority.

Read the complete book

Explore the 473-page English textbook on its official Google Play Books listing. The publisher's store page provides the available purchase and reading options for your region.