Introduction to Machine Learning
AI, machine learning, and deep learning are often used interchangeably, but they describe different scopes. Deep learning is a subfield of ML and ML is a subfield of AI.
Artificial Intelligence
└── Machine Learning
└── Deep Learning
Artificial Intelligence (AI)
AI is the broad field of building systems that perform tasks which normally require human intelligence. That includes understanding language, recognizing objects, making decisions, and learning from experience.
Common areas:
- Natural Language Processing (NLP): understand, interpret, and generate human language.
- Computer Vision: interpret images and video.
- Robotics: perform tasks autonomously or with human guidance.
- Expert Systems: mimic the decision making of a human expert.
Examples: disease diagnosis in healthcare, fraud detection in finance, threat detection in cybersecurity.
AI usually aims to augment human capabilities rather than replace them, by supporting analysis, prediction, and repetitive work.
Machine Learning (ML)
ML is a subfield of AI where systems learn patterns from data instead of being explicitly programmed for every rule. A model learns from examples, then makes predictions or decisions on new input.
Three main types:
- Supervised learning: trained on labeled data, where the correct answer is known. Examples: image classification, spam detection, fraud prevention.
- Unsupervised learning: trained on unlabeled data, looking for structure. Examples: customer segmentation, anomaly detection, dimensionality reduction.
- Reinforcement learning: learns by trial and error from rewards and penalties. Examples: game playing, robotics, autonomous driving.
Simple example: train a model on images labeled "cat" or "dog". It learns the features that separate the two and predicts a label for a new image.
Deep Learning (DL)
DL is a subfield of ML that uses neural networks with many layers. Instead of hand-crafted features, the network learns its own representations directly from the data, which works well for images, audio, and text.
Key characteristics:
- Hierarchical feature learning: early layers pick up simple patterns such as edges, later layers pick up objects.
- End to end learning: raw input maps directly to the output, without manual feature engineering.
- Scalability: performance improves with more data and more compute.
Common architectures:
- CNN (Convolutional Neural Network): images and video.
- RNN (Recurrent Neural Network): sequential data such as text and speech.
- Transformer: uses self attention, strong for NLP, and the base of most modern LLMs.
Examples: image classification, machine translation, speech to text.
How They Fit Together
- AI is the goal: intelligent behaviour.
- ML is the method: learn that behaviour from data.
- DL is a powerful class of ML: learn it with deep neural networks.
They are rarely used alone:
- Computer vision: supervised learning plus CNNs for image classification.
- NLP: classical ML plus transformers for translation and chat.
- Autonomous driving: ML and DL process sensor data and make real time decisions.
- Robotics: reinforcement learning, often with DL, trains control policies.
Why This Matters for Security
Most AI security work targets applications built on top of these layers, not the math itself. A transformer trained on a large corpus becomes an LLM, the LLM gets wrapped in an API and a chat UI, and then it gets retrieval and tool access. Every layer added around the model creates new attack surface, which is what the rest of this category focuses on.