Question bank › IB Computer Science › A4 Machine learning

Machine learning fundamentals: types and hardware

Answer on paper first, then reveal the mark scheme one mark at a time.

1Core3 marks

Describe the difference between supervised, unsupervised and reinforcement learning. [3]

2Core4 marks

Identify the type of machine learning being used in each of the following scenarios.

(a) An email provider trains a model on two million emails, each already tagged as “spam” or “not spam”, so that it can sort new emails. [1]

(b) A supermarket groups its customers according to their buying habits. No groups are defined in advance. [1]

(c) A warehouse robot learns to pick up parcels. It receives +1 point each time it lifts a parcel successfully and −1 point each time it drops one. [1]

(d) A developer takes a model that has already been trained to recognise everyday objects and retrains only its final layers on 500 photographs of diseased leaves, so that it can identify plant diseases. [1]

3Core3 marks

A small start-up wants to build an app that recognises different breeds of dog from photographs, but it only has 3000 labelled photographs and a limited budget.

(a) Describe what is meant by transfer learning. [2]

(b) Outline one reason why transfer learning is suitable for this start-up. [1]

Stuck on Machine learning fundamentals: types and hardware?

Get it sorted in a free 30-minute session

We work through your weakest questions on this topic on Zoom. I reply the same day.

4Standard3 marks

A research team trains a deep neural network. Training involves multiplying very large matrices of numbers millions of times.

Explain why the team would train the network on a graphics processing unit (GPU) rather than on a central processing unit (CPU). [3]

5Hard4 marks

A company designs a smart security camera that runs a trained image-recognition model. It is considering two types of chip to run the model: a field-programmable gate array (FPGA) or an application-specific integrated circuit (ASIC).

Compare the use of an FPGA and an ASIC for this purpose. [4]

6Standard6 marks

A student wants to train an image-classification model. The training requires a total of $5.4 \times 10^{17}$ floating-point operations. The table shows the peak processing speed of three options. 1 TFLOPS = $10^{12}$ floating-point operations per second.

OptionPeak speed (TFLOPS)Cost
Student’s laptop CPU0.4already owned
Desktop GPU30already owned
Cloud TPU instance250£8.00 per hour

(a) Calculate the time, in hours, to train the model on the laptop CPU. [2]

(b) Calculate the time, in hours, to train the model on the desktop GPU. [1]

(c) Calculate the cost of training the model on the cloud TPU instance. [2]

(d) Suggest one reason why the real training time is likely to be longer than the values you calculated. [1]

7Hard8 marks

A smart doorbell uses a machine-learning model to recognise the faces of visitors. The doorbell camera captures 15 frames per second and each frame is 200 KB.

The manufacturer is choosing between two designs:

  • Cloud design: every frame is uploaded to a cloud server, which runs the model and sends back the result.
  • Edge design: a small low-power AI chip inside the doorbell runs the model, and only an alert is sent when an unknown face is detected.

(a) Calculate the amount of data, in GB, that the cloud design would upload in one hour. Use 1 GB = $10^{6}$ KB. [2]

(b) Explain two advantages of the edge design for this doorbell. [4]

(c) Explain one limitation of running the model on the edge device. [2]

8Standard5 marks

A car manufacturer is developing a self-driving car. It uses deep learning to recognise pedestrians in camera images, and reinforcement learning in a driving simulator to learn when to change lanes.

(a) Outline what is meant by deep learning. [2]

(b) Explain why reinforcement learning is suitable for learning when to change lanes. [2]

(c) State one other real-world application of reinforcement learning. [1]

9Hard5 marks

A research group trains a large language model on a high-performance computing (HPC) cluster. The graph shows how the training time changes as more GPUs in the cluster are used.

(a) State the training time when 4 GPUs are used. [1]

(b) The speed-up is the training time on 1 GPU divided by the training time on $n$ GPUs. Calculate the speed-up when 16 GPUs are used. [1]

(c) The efficiency is the speed-up divided by the number of GPUs. Calculate the efficiency, as a percentage, when 16 GPUs are used. [1]

(d) Explain why doubling the number of GPUs does not halve the training time. [2]

020406080100124816965027159.6Number of GPUs in the clusterTraining time / hoursTraining time against number of GPUs
10Stretch6 marks

A university research group needs GPUs to train machine-learning models for the next three years. It expects to use about 300 GPU-hours per month. It has two options:

  • Option A: buy its own GPU server for £36 000, with running costs (electricity, cooling, maintenance) of £200 per month.
  • Option B: rent equivalent GPU instances from a cloud provider at £4.50 per GPU-hour.

Evaluate the two options for the research group. [6]

Stuck on this topic?

Book a free 30-minute session on WhatsApp and we'll find exactly which step is costing you the marks. Or build a timed paper on it.

Free 30-minute session