Course syllabus
Teachers
Bernhard Mehlig (lecturer and examiner). Please contact me at Bernhard.Mehlig at gu.se. Do not use CANVAS mail.
Isak Bengtsson (TA)
Thorsteinn Freygardsson (TA)
Johann Flemming Gloy (TA)
Fredrik Öhrlund (TA)
Course representatives
These course representatives were chosen by Chalmers:
Fatma Abughalioun
Isak Apelqvist
Gustav Bendrik
Jia Wei Chow
Daniel Temouri
News
Linear algebra repetition on Tuesday, Sept. 8 at 15:15 in KE.
First lecture on Thursday, Sept. 3 at 13:15 in KE.
Welcome
Welcome to Artificial Neural Networks 2026.
How to prepare? Login to the online system OpenTA on the menu on the left to do the preparatory linear-algebra exercises.
Sign up for the discussion forum. Please pose any OpenTA questions there.
Signup to discussion forum.
Link to discussion forum.
Important dates
First lectures on Thursday September 3 at 13:15 and 15:15 in KE.
Deadlines for homework problems: September 23 (HW1), October 14 (HW2), October 31 (HW3).
Contents
1. Introduction
Part I Hopfield models
2. Deterministic Hopfield networks
3. Stochastic Hopfield networks.
4. The Boltzmann distribution
Part II Supervised learning
5. Perceptrons
6. Backpropagation
7. Deep learning
8. Convolutional networks
9. Recurrent networks
Part III Learning without labels
10. Unsupervised learning
11. Reinforcement learning
Preliminary schedule
See TimeEdit for schedule.
Lecture 1 Sept. 3 13:15 Introduction (Chapter 1, Slides) Bernhard Mehlig
Lecture 2 Sept. 3 15:15 Hopfield model, one-step error probability (Chapter 2) Bernhard Mehlig
Lecture 3 Sept. 4 13:15 Hopfield model (Chapter 2) Bernhard Mehlig
Lecture 4 Sept. 8 13:15 Hopfield model (Chapter 2) Bernhard Mehlig
For discussion of energy function, see separate video
Lecture 5 Sept. 8 15:15 Linear algebra (repetition, summary) Bernhard Mehlig
Lecture 6 Sept. 10 13:15 Hopfield model (Chapter 3) Bernhard Mehlig
For derivation of mean-field theory, see video
For calculation of critical storage capacity, see video
Exercise class 1 Sept. 10 15:15 Exam preparation (Exercises 2.3, 2.8. 2.9, 2.10 erratum) Bernhard Mehlig
Lecture 7 Sept. 11 13:15 Monte-Carlo simulation (Sections 4.1, 4.2 & 4.3) Bernhard Mehlig
Guest Tutorial Sept. 11 15:15 Programming tools for homework problems Lukas Prader
Lecture 8 Sept. 15 13:15 Boltzmann machines (Sections 4.4 & 4.5) Bernhard Mehlig
Lecture 9 Sept. 15 15:15 Simple perceptrons (Chapter 5 and Slides) Bernhard Mehlig .
Exercise class 2 Sept. 17 13:15 Virtual. Zoom link. HW1 Johann Flemming Gloy
Exercise class 3 Sept. 17 15:15 Exam preparation (Exercises 3.4, 3.5, 4.4, 4.6) Isak Bengtsson
Exercise class 4 TBA Exam preparation (Exercises 2.13, 5.4, 5.5) Fredrik Öhrlund
Lecture 10 Sept. 22 13:15 Sections 5.3, 5,5, 5.6 Bernhard Mehlig
For capacity of simple perceptron, see separate video.
Exercise class 5 Sept. 22 Exam preparation (Exercises 5.6, 5.8, 5.11) Bernhard Mehlig
Lecture 11 Sept. 24 13:15 Sections 6.1, 6.2 & 6.3 Bernhard Mehlig
Lecture 12 Sept. 24 15:15 Sections 6.4, 6.5, 7.1 & 7.2 Bernhard Mehlig
Lecture 13 Sept. 25 13:15 Section 7.5 Bernhard Mehlig
Lecture 14 Sep. 29 13:15 Section 7.5 Bernhard Mehlig
Please read Chapter 8 at home. I'll take questions on Oct. 2
Exercise class 6 Sep. 29 15:15 Exercises (6.1, 6.2, 6.4, 6.5, 6.6, 6.7) Bernhard Mehlig
Lecture 15 Oct. 1 13:15 Section 7.6 Bernhard Mehlig
Exercise class 7 Oct. 1 15:15 Exam prepration (Exercises 7.2, 7.4, 7.6, 7.7) Bernhard Mehlig
Lecture 16 Oct. 2 13:15 Convolutional neural networks Bernhard Mehlig
Exercise class 8 Oct. 2 15:15 HW2 Isak Bengtsson
Lecture 17 Oct. 8 13:15 Section 9.1 Bernhard Mehlig
Lecture 18 Oct. 8 15:15 Sections 9.2, 9.3, and Transformers Bernhard Mehlig
Lecture 19 Oct. 13 13:15 Reservoir computers (Section 9.5) Ridge regression) and Summary unsupervised learning Bernhard Mehlig
Exercise class 9 Oct. 13 15:15 HW3 (notes for reservoir computing task) Thorsteinn Freygardsson
Lecture 20 Oct. 15 13:15 Sections 10.1, 10.2 Bernhard Mehlig
Lecture 21 Oct. 15 15:15 Section 10.3 Bernhard Mehlig
Lecture 22 Oct. 16 13:15 Sections 10.4, 10.5, and 10.6 Bernhard Mehlig
Lecture 23 Oct. 20 13:15 Chapter 11 PDF) Bernhard Mehlig
Exercise class 10 Oct. 20 15:15 Exam preparation (Exercises 2.11, 2.12, 5.1, 6.8) NN
Exercise class 11 Oct. 22 13:15 Exam preparation (Exercises 8.1, 8.3, 10.3, 10.14) NN
Lecture 24 Oct. 22 15:15 Exam preparation (Exercise 5.6 and variations, 6.6 and variations, comments on 2.10 and 8.1, 4.1, 4.9) Bernhard Mehlig
Lecture 25 Oct. 23 13:15 Exam preparation (energy function in Hopfield model, pp. 27, 28) Bernhard Mehlig
Chapters and Sections refer to the course book below.
Course book
B. Mehlig, Machine learning with neural networks, Cambridge University Press (2021).
Errata for Machine Learning with Neural Networks (October 18, 2022).
The course book is availabe at ChalmersStore and CUP. You can take the printed book to the exam. It is your responsibility to order the book in time if you want to have it in the exam.
Examination
Credits for this course are obtained by solving the homework problems (solutions of examples and programming projects) and by a written examination. There are three sets of homework problems. Each of the three gives at most 3 points. The exam gives at most 15 points, resulting in a maximum of 24 points.
To pass the course, it is necessary to obtain at least 6 points in the written exam, and to have at > 13.5 points in total.
Passing grades:
Chalmers: 3: >13.5p; 4: >17p, 5: >21.5p
GU: G: >13.5p; VG: >19.5p
ECTS: C: >13.5p; B: >17p; A: >21.5p
OpenTA
This course uses the OpenTA online system for exercises, homework, and exam preparation.
Experimental AI assistant
Use this link to get answers to questions about the course contents, homework tasks, and exam preparation. This is an experimental AI assistant created by Stellan Östlund. It is fed with course-related material. Please try it out and give feedback on piazza.
You can use the AI assistant with a free ChatGPT account. Your ChatpGPT credits are used for these conversations. They are completely private between you and OpenAI, not in any way monitored by the examiner or creator of the GPT.
Rules for homework submissions
Same rules as for written exams apply: it is not allowed to copy any material from anywhere unless reference is given: all sources must be stated in writing (e.g. old solutions, fellow students, internet, ChatGPT). All students must write their own computer programs and submit their own solutions and program code via OpenTA.
Keep a backup of your solutions to the OpenTA questions, of your submitted PDF files as well as the answers you typed in. The system does not store your answers after December 2026. If you take a re-exam in January or August 2027 you will be asked to re-submit all answers and OpenTA scores.
Your OpenTA points are valid for the two re-exams in January and August 2027. Please contact any of the teachers if you need guidance for your exam preparation, or if you have questions about the coming re-exams. To pass the course in future academic years (for instance 2027/2028) you need to redo the OpenTA problems for that academic year.
For some OpenTA problems, you are asked to submit your answer in the form of a PDF file. It must be a single A4 page with 12pt single-spaced text, and with 2cm margins. LateX template. The page may contain at most one Figure and/or one Table with the corresponding Figure and/or Table caption, in addition to the text discussing the results shown in the Figure/Table. It is not necessary to write a full page, but you must explain/describe what you have done, clearly state your results/answers, your conclusions, and cite the sources used. When necessary, you must discuss possible errors and inaccuracies in your results. If you are asked to plot results/make graphs, you do this in a Figure with legible axis labels and tic labels. All symbols and lines must be explained in the Figure or in a caption. The Figure may consist of separate panels. Refer to them as 'left panel', 'right panel', 'bottom panel', etc. (or alternatively label them 'a', 'b',...).
In addition you need to upload a PDF file with the computer code you used to generate your results. No length restriction applies for this file.
Deadlines are sharp. Late submissions are not accepted.
Rules for homework resubmissions
Most homework tasks are automatically graded. For these tasks, you only get the green light from OpenTA. You can try as often as you want (before the deadline).
Some homework tasks require you to submit a one-page PDF file with your results and discussion. These are manually graded. If we find errors or problems in these solutions you will be notified (text message on OpenTA) and you are allowed to resubmit. The final deadline for resubmissions is to be determined, a few days after the exam. After that date, the system does not accept any resubmissions. If you resubmit before that deadline and your solution is correct, you get full points for that task.
Written exam
Allowed material for exam: course book, only printed by Cambridge University Press, no written annotations (underlining/highlighting allowed).
The exam covers the material presented in the lectures as well as the homework problems. Old exam questions are given in the course book. Solutions.
Old exams with solutions
August 2026
January 2026
October 2025
August 2025
January 2025
October 2024
August 2024
January 2024
October 2023
August 2023
January 2023
October 2022
August 2022
January 2022
October 2021
August 2021
January 2021
October 2020
Note: from October 2022 onwards, students are allowed to have the course book (as printed by CUP) in the exam.
Date for written exam, deadline for registration for exam. Please follow this link. Course code FFR135.
If date & time of the exam collide with another exam you must take, then you must follow the steps outlined here.
If you don't pass the exam
Your OpenTA points are valid for the two re-exams in January and August 2026. Please contact any of the teachers if you need guidance for your exam preparation, or if you have questions about the coming re-exams. To pass the course in future academic years, you need to redo the OpenTA problems for that academic year.
Changes from last year
Course summary:
| Date | Details | Due |
|---|---|---|