Defining AI
- Artificial Intelligence — the ability of computers or machines to perform tasks that normally require human intelligence.
- What AI systems can do — learn from data, recognize patterns, make predictions, understand language, recognize images, solve problems and make decisions, automate repetitive tasks.
- Why we need it — humans generate enormous amounts of data every day, far more than people can examine by hand.
- What AI helps us do — analyze large amounts of data quickly, find hidden patterns humans might miss, automate repetitive tasks, make faster and more accurate decisions, detect unusual or suspicious activity, reduce human workload on complex problems.
- Scale example — a human analyst may struggle to review millions of network events by hand; an AI system scans them all automatically and flags the suspicious ones in seconds, not weeks.
How an AI system works
A simple AI system is four connected stages: Data → Learning → Model → Prediction.
- Data — thousands of emails collected.
- Learning — analyze words and patterns.
- Model — learn what spam looks like.
- Prediction — Spam or Not Spam?
- Key idea — data is one of the most important ingredients of any modern AI system; better data generally means a better model.
Three levels of AI capability
| Level | Status | Definition & examples |
| Narrow AI | In use today | Designed for one specific task. Spam detection, facial recognition, chatbots, recommendation systems, malware detection. |
| General AI | Theoretical | Capable of performing many intellectual tasks like a human. Still a research goal — not yet achieved. |
| Superintelligence | Hypothetical | Would exceed human intelligence across many areas. Discussed in long-term AI safety research. |
Today, almost all practical AI systems in use are Narrow AI.
Major areas of AI
- Machine Learning · Deep Learning · Computer Vision · Natural Language Processing
- Robotics · Expert Systems · Knowledge Representation · Search & Optimization
- Course focus — Artificial Intelligence → Machine Learning → Cybersecurity Applications.
AI, Machine Learning, and Deep Learning
- Nested circles — Deep Learning inside Machine Learning inside AI.
- AI is the broadest field — the overall goal is to build systems that behave intelligently.
- ML is a subset of AI — a technique where computers learn patterns directly from data.
- DL is a subset of ML — uses multi-layer neural networks for complex data like images and text.
AI vs Machine Learning — the two formulas
- Artificial Intelligence — the broad goal of creating systems capable of intelligent behavior.
- Machine Learning — a technique that lets computers learn patterns from data, instead of being explicitly programmed for every situation.
- Traditional programming — Data + Rules → Output.
- Machine learning — Data + Expected Outputs → Learning → Model.
- Then — New Data + Model → Prediction. The trained model can now make predictions on data it has never seen before.
What is Machine Learning?
- Definition — ML lets computers learn patterns from data and use those patterns to make predictions or decisions.
- Simple definition — Machine Learning = learning patterns from data. Instead of a programmer writing every rule by hand, the system studies many examples and works out the rules itself.
- Common examples — predict whether an email is spam, detect fraudulent transactions, predict house prices, recognize malicious network traffic, recommend movies or products, detect malware.
Worked example — detecting phishing emails
- Setup — suppose we have 10,000 emails; some are Normal and some are Phishing. We give these labeled examples to a Machine Learning algorithm.
- Patterns the algorithm learns — suspicious words in the message, unusual or fake-looking URLs, sender information that looks wrong, odd message structure.
- Then a new email arrives — New Email → ML Model → Phishing or Legitimate.
- Why it matters — this is one of the clearest ways AI supports cybersecurity: learning from past examples to judge brand-new emails.
Deep Learning
- Definition — a specialized type of Machine Learning that uses artificial neural networks with multiple layers.
- Especially powerful for — images, text, audio, video, large-scale datasets with millions of examples.
- Where you'll see it — face recognition, speech recognition, large language models (like chatbots), medical image analysis, advanced malware detection.
Machine Learning vs Deep Learning
| Machine Learning | Deep Learning |
| Relationship | Subset of AI | Subset of Machine Learning |
| Learns from | Data, with patterns found by algorithms | Data, using multi-layer neural networks |
| Works best with | Structured, tabular data | Complex / unstructured data (images, text) |
| Feature engineering | Often needs manual feature selection | Can automatically learn complex features |
| Dataset size | Can work with smaller datasets | Often benefits from very large datasets |
| Compute cost | Usually less computationally expensive | Often requires more computing power |
Both can be useful in cybersecurity — the right choice depends on the data available and the problem being solved.
Computer Vision and Natural Language Processing
- Computer Vision (CV) — enables computers to understand and analyze visual information. Works with images, videos, camera feeds, scanned documents.
- CV examples — face recognition, object detection, medical image analysis, license-plate recognition, security-camera analysis, image classification.
- Natural Language Processing (NLP) — enables computers to understand, analyze, and generate human language. Works with text and documents, emails and messages, speech converted to text.
- NLP examples — chatbots, language translation, sentiment analysis, email classification, phishing-email detection, text summarization.
- Side by side — CV primarily works with images and videos; NLP primarily works with text, messages, emails, and language. Both are important application areas of modern AI and many real systems combine them.
Three major types of Machine Learning
- Supervised Learning — learn from labeled data; the correct answer is already known. The model learns Input → Known Output, then predicts the label of brand-new, unseen data. Cybersecurity examples: malware vs benign software, spam vs legitimate email, fraud vs legitimate transaction, malicious vs normal network traffic.
- Unsupervised Learning — works with data that has no predefined labels. The system tries to discover groups of similar data, hidden patterns, similarities and differences, and unusual behavior. An anomaly points to a possible security threat.
- Reinforcement Learning — an agent learns by interacting with an environment: Observes → Takes Action → Receives Reward/Penalty → Learns, then loops. Security example: the system observes a possible attack and can allow the traffic, block the traffic, or request additional verification. Good decisions receive positive rewards, bad decisions receive penalties, and over time the system learns better defensive strategies.
| Type | Data / Feedback | Main goal | Cybersecurity example |
| Supervised | Labeled data | Predict known classes | Malware classification |
| Unsupervised | Unlabeled data | Discover patterns | Anomaly detection |
| Reinforcement | Rewards / Penalties | Learn actions | Adaptive cyber defense |
Easy way to remember: Supervised = learn with answers · Unsupervised = find patterns without answers · Reinforcement = learn from rewards.
Data
- Definition — data is information collected and stored so it can be analyzed or used by computer systems.
- Data can represent — numbers and text; images, video, and audio; network traffic; user activities and computer logs; transactions.
- Key idea — Data → Learning → Model → Prediction. AI depends heavily on data. Poor-quality data leads to poor-quality AI models — "garbage in, garbage out."
- Structured data — organized in a predefined format, often rows and columns. Examples: database tables, Excel files, transaction records, customer information.
- Unstructured data — data without a simple tabular structure. Examples: images and videos, emails and documents, audio, social media posts.
- AI techniques can work with both types — often in the same system.
Structured data — security example
| IP address | Failed logins | Data transfer | Threat |
| 192.168.1.10 | 2 | 15 MB | Normal |
| 192.168.1.25 | 145 | 4.8 GB | Suspicious |
| 192.168.1.30 | 1 | 22 MB | Normal |
Because this information has defined rows and columns, it is structured data. Machine Learning can use these features — failed logins, data transferred, and more — to detect suspicious behavior automatically, without a human reviewing every row.
Unstructured data — security example
- Cybersecurity also produces large amounts of unstructured or semi-structured information: phishing email text, security reports and PDF documents, screenshots and images, malware files, chat messages, audio / video evidence.
- Matching AI technique to data — Text → Natural Language Processing. Images / Video → Computer Vision. Different AI techniques suit different data types.
The AI / ML pipeline — seven steps
- 1. Collect Data → 2. Clean & Prepare Data → 3. Select Useful Features → 4. Train a Model → 5. Evaluate the Model → 6. Make Predictions → 7. Deploy & Monitor
- Cybersecurity example — Network Logs → Prepare Data → Train Model → Detect Attacks.
- The same seven-step pipeline that predicts house prices or recommends movies can be pointed at network logs to automatically detect cyberattacks — the process is the same, only the data and the goal change.