All guides
Practice now
D1 · AI and ML fundamentals

Deep Learning and neural networks

Deep learning is the technique behind modern foundation models. Understanding its basic architecture — without diving into the math — gives you the context you need to reason about generative AI for the rest of the exam.

What a neural network is

An artificial neural network is a computational model organized into layers of interconnected "neurons", loosely inspired by the biological brain. You don't need to understand the underlying math for the exam — just its conceptual structure.

Input layer

Receives the raw data: the pixels of an image, the numeric values of a data row, the tokens of a text. Each input neuron represents one feature of the input.

Hidden layers

Each neuron combines the outputs of the previous layer using weights (how much each input matters) and an activation function that introduces non-linearity. "Deep" learning refers precisely to having many hidden layers stacked together.

Output layer

Produces the final result: a class probability, a numeric value, or — in a language model — a probability distribution over the next possible token.

Training, in one sentence

Training a neural network means iteratively adjusting the weights between neurons so that predictions get closer and closer to the correct answer, by comparing the error and propagating it back through the network (backpropagation) to correct the weights layer by layer.

Related labD1 · AI and ML Fundamentals

Train a model and watch the loss curve

Launch a training job in SageMaker and watch the loss function decrease epoch after epoch.

Understand what the loss function measures during training
Configure a training job with an algorithm and a number of epochs

+1 more...

9 min6 steps

Classic ML vs Deep Learning

AspectClassic MLDeep Learning
Feature extractionManual — an expert defines which features to use (feature engineering)Automatic — the network learns its own internal representations from hidden layers
Data volume neededWorks reasonably well with small or medium datasetsRequires large datasets to generalize well
Compute powerCan be trained on CPU in minutes or hoursGenerally requires GPUs and can take hours, days, or weeks
Example algorithmsLinear/logistic regression, decision trees, random forest, SVMDeep neural networks: CNN, RNN, Transformers
InterpretabilityEasier to explain why a decision was madeHarder to interpret ("black box")

Deep Learning is a subset of Machine Learning, which in turn is a subset of Artificial Intelligence. All modern generative AI foundation models (GPT, Claude, Llama, Titan) are built with deep learning architectures, specifically Transformers.

AI, ML, Deep Learning, GenAI, and Agentic AI

The exam requires distinguishing these five terms precisely. The easiest way to remember them is as concentric circles: each one is a more specific subset of the previous one.

1

Artificial Intelligence (AI)

The broadest field: any technique that lets a machine simulate intelligent behavior — from hand-written "if-then" rules to today's most advanced models.

2

Machine Learning (ML)

Subset of AI where the system learns patterns from data, instead of following explicitly programmed rules.

3

Deep Learning

Subset of ML that uses neural networks with many layers to automatically learn representations, without manual feature engineering.

4

Generative AI (GenAI)

Subset of deep learning focused on generating new content (text, images, audio, code) using foundation models trained on massive volumes of data.

5

Agentic AI

The most specific level: systems that combine a GenAI foundation model with memory, planning, and access to external tools to act autonomously in pursuit of a goal — making decisions and executing actions without human supervision at every step.

Agentic AI in practice

A chatbot that answers a question is GenAI. A system that you give the goal "book the cheapest flight for these dates", which searches options, compares prices, checks company policies, and completes the booking without a human approving each intermediate step, is Agentic AI. On AWS, is the service that enables this kind of autonomous behavior.

Think of it as concentric circles: AI ⊃ ML ⊃ Deep Learning ⊃ GenAI. Agentic AI isn't an even smaller circle inside GenAI, but a behavior layer built on top of GenAI that adds memory, planning, and tools to act autonomously.

CNN — convolutional networks for vision

Convolutional Neural Networks (CNN) are the classic architecture for computer vision tasks: image classification, object detection, segmentation.

Core idea

Instead of connecting every pixel to every neuron (computationally infeasible for large images), a CNN applies small filters (kernels) that slide over the image detecting local patterns: edges, textures, shapes. Early layers detect simple patterns (edges, colors); deeper layers combine those patterns into increasingly abstract concepts (eyes, faces, whole objects).

AWS services like use vision models based on this type of architecture, already trained and exposed as an API.

RNN and Transformers — networks for sequences and language

RNN (Recurrent Neural Networks)

Designed for sequential data (text, audio, time series). They process the sequence element by element, keeping an internal "state" or memory that's updated at each step, allowing prior context to influence the processing of the next element.

Key limitation: they process sequentially (slow to train in parallel) and lose context from elements far back in the sequence ("short memory").

Transformers

An architecture introduced in 2017 that replaced RNNs as the standard for language. It uses a mechanism called attention: instead of processing word by word sequentially, it evaluates the relationships between all the words in the sequence simultaneously, "paying more attention" to the most relevant parts of the context for each prediction.

This allows for massively parallel training (leveraging GPUs) and capturing long-range dependencies in text — the foundation of all modern LLMs (GPT, Claude, Titan, Llama).

For the exam

You don't need to know how to implement attention mathematically. You need to recognize that text foundation models (the ones behind Amazon Bedrock) are based on the Transformer architecture, and that this is why they can process long context and generate coherent text.

GPUs vs CPUs for training

Deep learning training essentially consists of enormous amounts of matrix operations that can be run in parallel. This determines which type of hardware is most efficient for each task.

CPU (Central Processing Unit)

Few cores, very powerful, optimized for sequential, general-purpose tasks. Suitable for classic ML, data preprocessing, and inference of small models, but inefficient for training large neural networks.

GPU (Graphics Processing Unit)

Thousands of simpler cores designed to run many operations in parallel simultaneously — exactly what the matrix algebra of a neural network requires. It's the standard hardware for training and inferring with foundation models at scale.

On AWS, services like let you select GPU-backed instances (EC2 P and G families) for deep learning training and inference. Amazon Bedrock fully abstracts this decision away: AWS manages the underlying hardware to serve the foundation models, you just consume the API.

Did you get this topic?

Test what you just learned

What key characteristic distinguishes the Transformer architecture from traditional RNNs for processing language?

Ready to test "Deep Learning and neural networks"?

Put what you learned to the test with original AIF-C01 exam questions.

Start AIF-C01 mock exam

Unlimited mock exams with the Pro plan

Log in to track your progress.