IB Computer Science HL · Year 2 · Lesson 54

ANNs, CNNs and model selection

Machine-learning approaches differ in what they learn, how they are trained, how they are evaluated and which problems they suit.

Paper 150 minutesA4.3.8 · A4.3.9 · A4.3.10
Today’s targets

What you need to be able to do

2 / 10
  • OutlineThe structure and function of ANNs and how multi-layer networks are used to model complex patterns in data sets
  • DescribeHow CNNs are designed to adaptively learn spatial hierarchies of features in images
  • ExplainThe importance of model selection and comparison in machine learning
A4.3.8A4.3.9A4.3.10
Paper 1 lensMatch the depth of every response to the command term. Previously learned content can move quickly, but retrieval must still be accurate.
Retrieve

Rapid Recall Deck

3 / 10

Say the answer aloud before flipping. Mark secure knowledge quickly and spend time on the gaps.

  • What is an artificial neural network (ANN)?: A model made of interconnected artificial neurons/nodes that transform input data and learn parameters to perform tasks such as classification, regression, and pattern recognition.
  • What are the main parts of a single perceptron?: Inputs, weights, bias, activation function, and output.
  • What are the main layers of a multi-layer perceptron (MLP)?: An input layer, one or more hidden layers, and an output layer.
  • What is the basic architecture of a CNN?: Input layer, convolutional layers, activation functions, pooling layers, fully connected layers, and output layer.
  • What is the role of a convolutional layer in image processing?: It applies learnable filters across local regions to detect spatial features and build feature maps.
  • How can kernel size and stride affect a CNN?: Kernel size controls the local region examined by a filter; stride controls how far the filter moves and therefore affects output resolution and computation.
  • Why do activation and loss functions matter in a CNN?: Activation functions shape nonlinear processing; the loss function defines the error signal used to improve model parameters during training.
  • Why is model selection important?: Different models perform differently depending on the data, problem type, complexity, constraints, and desired outcomes, so alternatives must be compared rather than assuming one model is always best.
A4.3.8 + A4.3.9 · Learn

Core knowledge and application

4 / 10
A4.3.8Outline

The structure and function of ANNs and how multi-layer networks are used to model complex patterns in data sets

Machine-learning approaches differ in what they learn, how they are trained, how they are evaluated and which problems they suit.

Exam moveGive a brief, focused account containing the essential points.
Required detail 1An artificial neural network (ANN) to simulate interconnected nodes or “neurons” to process and learn from input data, enabling tasks such as classification, regression and pattern recognition
Required detail 2Sketch of a single perceptron, highlighting its input, weights, bias, activation function and output
Required detail 3Sketch of a multi-layer perceptron (MLP) encompassing the input layer, one or more hidden layers and the output layer

Explain it without notes

Outline: The structure and function of ANNs and how multi-layer networks are used to model complex patterns in data sets in the context of a team comparing candidate models for prediction, clustering and automation.

  • An artificial neural network (ANN) to simulate interconnected nodes or “neurons” to process and learn from input data, enabling tasks such as classification, regression and pattern recognition
  • Sketch of a single perceptron, highlighting its input, weights, bias, activation function and output
  • Sketch of a multi-layer perceptron (MLP) encompassing the input layer, one or more hidden layers and the output layer
A4.3.9Describe

How CNNs are designed to adaptively learn spatial hierarchies of features in images

Machine-learning approaches differ in what they learn, how they are trained, how they are evaluated and which problems they suit.

Exam moveGive a detailed, accurate account of what happens or what something is like.
Required detail 1Convolutional neural network (CNN) basic architecture: input layer, convolutional layers, activation functions, pooling layers, fully connected layers, output layer
Required detail 2The effect of the number of layers, kernel size and stride, activation function selection, and the loss function on how CNNs process input data and classify images
Assessment boundaryCNNs illustrate ML ideas; students are not assessed on full technical detail beyond the Guide boundaries.

Explain it without notes

Describe: How CNNs are designed to adaptively learn spatial hierarchies of features in images in the context of a team comparing candidate models for prediction, clustering and automation.

  • Convolutional neural network (CNN) basic architecture: input layer, convolutional layers, activation functions, pooling layers, fully connected layers, output layer
  • The effect of the number of layers, kernel size and stride, activation function selection, and the loss function on how CNNs process input data and classify images
A4.3.10 · Learn

Core knowledge and application

5 / 10
A4.3.10Explain

The importance of model selection and comparison in machine learning

Machine-learning approaches differ in what they learn, how they are trained, how they are evaluated and which problems they suit.

Exam moveGive the mechanism or relationship and make the reasons/causes explicit.
Required detail 1How different algorithms can yield different results depending on the data and type of problem
Required detail 2The reasons for selecting specific machine learning models over others, considering factors like the nature of the problem, its complexity and desired outcomes
Required detail 3The variability in algorithm performance based on the data’s characteristics

Explain it without notes

Explain: The importance of model selection and comparison in machine learning in the context of a team comparing candidate models for prediction, clustering and automation.

  • How different algorithms can yield different results depending on the data and type of problem
  • The reasons for selecting specific machine learning models over others, considering factors like the nature of the problem, its complexity and desired outcomes
  • The variability in algorithm performance based on the data’s characteristics
Worked diagrams · A4.3.8–A4.3.10

Perceptron, MLP and CNN architecture

6 / 10

Single perceptron

x₁ × w₁
x₂ × w₂
Σ + bias
activation
output

Multi-layer perceptron

Input layer
Hidden layer
Hidden layer
Output layer

Multiple layers allow nonlinear combinations of learned features and can model more complex patterns.

CNN flow

Image input
Convolution
Activation
Pooling
Fully connected
Output

Layer count, kernel size, stride, activation choice and loss function affect how features are extracted and how the model learns to classify images.

Model selectionCompare candidate models using the nature of the problem, data characteristics, complexity, performance evidence and desired outcomes. A more complex model is not automatically a better model.
Apply

Transfer to a new scenario

7 / 10
ScenarioA team comparing candidate models for prediction, clustering and automation needs a design or technical decision related to today’s topic. Explain what matters and why.
  • An artificial neural network (ANN) to simulate interconnected nodes or “neurons” to process and learn from input data, enabling tasks such as classification, regression and pattern recognition
  • Sketch of a single perceptron, highlighting its input, weights, bias, activation function and output
  • Convolutional neural network (CNN) basic architecture: input layer, convolutional layers, activation functions, pooling layers, fully connected layers, output layer
  • The effect of the number of layers, kernel size and stride, activation function selection, and the loss function on how CNNs process input data and classify images
  • How different algorithms can yield different results depending on the data and type of problem
  • The reasons for selecting specific machine learning models over others, considering factors like the nature of the problem, its complexity and desired outcomes
Exam lens

Paper 1 practice

8 / 10
Build the response before checking notesUse precise terminology and match the required depth.
  1. Outline: The structure and function of ANNs and how multi-layer networks are used to model complex patterns in data sets in the context of a team comparing candidate models for prediction, clustering and automation.
  2. Describe: How CNNs are designed to adaptively learn spatial hierarchies of features in images in the context of a team comparing candidate models for prediction, clustering and automation.
  3. Explain: The importance of model selection and comparison in machine learning in the context of a team comparing candidate models for prediction, clustering and automation.
Self-checkAnswer the exact command term. For explain, include mechanism/reason; for compare, pair criteria; for discuss/evaluate/justify, build supported reasoning and a conclusion.
2027 Case Study

Generative AI research checkpoint

9 / 10

Build a reusable evidence bank for Paper 1 Section B. Keep claims technical, specific and supported.

DenoisingRemoving noise from a corrupted/noisy representation to recover or create a coherent image.
Know and apply in case-study context
UnconditionalGeneration without a user-supplied condition; output comes from patterns learned from training data.
Know and apply in case-study context
Adversarial dynamicThe competitive training relationship in a GAN between the generator and discriminator.
Deep for HL where tied to GAN/hybrid challenges
Flow-based modelA generative model that learns an invertible mapping between data and a simpler probability distribution.
Broad understanding sufficient
Homework

Finish the learning cycle

10 / 10

Exam preparation — main task

Complete targeted 2027 case-study research and cumulative Paper 1/Paper 2 practice. Record evidence and technical vocabulary you can use in extended responses.

Retrieval

Repeat today’s recall deck and revisit any item marked ‘Review again’.