About this machine learning lecture series

This lecture series is designed as a practical introduction to machine learning, for physicists and anyone with a similar background (engineers,mathematicians,chemists,…). I have given these lectures since 2017, almost every year. Videos are available on youtube (see below, most recent version from 2019). Slides and homework problems and tutorial code is available as well.

For the most recent versions of the course, please follow the links:

https://pad.gwdg.de/s/Machine_Learning_For_Physicists_2023

2024 version (in progress): https://pad.gwdg.de/s/ZwIoM-Arn

Note that as of 2024 we have switched from tensorflow/keras to jax, which we believe to be very useful for physicists, since it is essentially numpy with a handful of additions.

Coming up: 2020 Lectures for Everyone!

Starting April 21st, we are offering to anyone in the world an online version of these lectures! (Registration was until 21st)

We have now set up a dedicated website for this course (where you will also find a link to a discussion forum and other materials, as well as the course outline and the video links):

Online Course Machine Learning for Physicists 2020 Website

This will be ‘inverted classroom’ style – that means each week you will watch one of the recorded video lectures (see link below) and then we will have an approximately 90min time slot for discussion and tutorials, using zoom.

The first online meeting took place on April 21st, at 6pm German time, with more than 700 participants. The second session will be one week later, and by that time, you will have watched the first of the video lectures, so we can start discussing that! The online session takes place every week Tuesday 6pm, until August 4. (exception: no session July 7)

 

 

Welcome

This site allows you to watch the videos and download the lecture note pdfs for the course “Machine Learning for Physicists”. That course was taught in the summer term 2017 by Florian Marquardt.

Please see the original course website for instructions of how to install python, theano, and keras, and for example python files! (Note: In the lectures, we only use keras functionality, so you can also install tensorflow instead of theano as the underlying framework – this is probably better, since theano will no longer be updated)

File-MachineLearningHeader

About these Lectures: Machine Learning for Physicists

FirstPicture

Description: This is a course introducing modern techniques of machine learning, especially deep neural networks, to an audience of physicists. Neural networks can be trained to perform many challenging tasks, including image recognition and natural language processing, just by showing them many examples. While neural networks have been introduced already in the 50s, they really have taken off in the past decade, with spectacular successes in many areas. Often, their performance now surpasses humans, as proven by the recent achievements in handwriting recognition and in winning the game of ‘Go’ against expert human players. They are now also being considered more and more for applications in physics, ranging from predictions of material properties to analyzing phase transitions.

Contents: We cover the basics of neural networks (backpropagation), convolutional networks, autoencoders, restricted Boltzmann machines, and recurrent neural networks, as well as the recently emerging applications in physics. We also cover reinforcement learning, which permits to discover solutions to challenges based on rewards (instead of seeing examples with known correct answers). In the end, we describe some general thoughts on future artificial scientific discovery. We present examples using the ‘python’ programming language, which is a modern interpreted language with powerful linear algebra and plotting functions. In particular, we use the “keras” python package that allows to very conveniently implement neural networks with only a few lines of code (using the library “theano”, or, alternatively, “TensorFlow”).

Prerequisites: As a prerequisite you will only need matrix multiplication and the chain rule, i.e. the course will be understandable to bachelor students, master students and graduate students. However, knowledge of any computer programming language will make it much more fun.

Lectures Video: Machine Learning for Physicists

Watch the videos on Apple iTunes or on the Lecture Videos Site of the University Erlangen-Nuremberg, or jump to the direct links below!

VideosThumbnail

Direct Links

Lecture 1: Introduction

Lecture 2: Training a Neural Network

Lecture 3: Training (Backpropagation Algorithm)

Lecture 4: Analyzing a network. Using the python framework “keras”

Lecture 5: Image classification

Lecture 6: Convolutional networks, Autoencoder

Lecture 7: Visualization of neuron activations (t-SNE method), Adaptive Gradient Descent Techniques

Lecture 8: Recurrent networks (LSTM)

Lecture 9: Word Vectors, Reinforcement Learning, REINFORCE (Policy Gradient)

Lecture 10: Policy Gradient (continued), Baseline, alphaGo, Q learning

Lecture 11: Q learning (finished), Restricted Boltzmann Machine

Lecture 12: Neural Network Applications in Science, Artificial Intelligence and Artificial Scientific Discovery

Download the lectures as PDF

These are lectures about neural networks, for physicists. These lectures were delivered in the summer term 2017 by Florian Marquardt at the university of Erlangen-Nuremberg, Germany. Download the PDF here (split into three parts). See the other posts for further information and for the video recordings!

Machine Learning for Physicists (Lectures by Florian Marquardt, Part One) [25 MB]

Machine Learning for Physicists (Part Two) [13 MB]

Machine Learning for Physicists (Part Three) [4 MB]

SlidesLecture1

 

Here is a link to a folder containing the example code (no guarantees):

Machine Learning for Physicists code (ownCloud folder)

Reviews

A year ago, there was hardly any literature to guide the physicist interested in machine learning. But now, dedicated reviews are appearing. Here are two recent, very useful ones:

Machine learning & artificial intelligence in the quantum domain (arXiv:1709.02779) – by  Vedran Dunjko, Hans J. Briegel

A high-bias, low-variance introduction to Machine Learning for physicists (arXiv:1803.08823) – by Pankaj Mehta, Marin Bukov, Ching-Hao Wang, Alexandre G.R. Day, Clint Richardson, Charles K. Fisher, David J. Schwab. This even includes python notebooks!

 

Advanced example: Reinforcement Learning for Quantum Feedback and Control

Here is an example from our own group which combines many of the advanced techniques that are explained in the lectures (in particular, reinforcement learning and recurrent networks). Our setting is simple: you are given a set of a few qubits, with one of them initialized in an arbitrary (unknown) initial quantum state. There is decoherence due to the unavoidable noise of the environment. How do you best preserve the quantum state? Using reinforcement learning, the neural network discovers from scratch quantum error correction strategies. These involve gates (e.g. CNOT) that manipulate and entangle the qubits. The strategies also involve measurements, and the subsequent actions will depend on the measurement outcomes. This challenge demonstrates very nicely the power of reinforcement learning: the same program can be applied to many different physical scenarios.

Read the paper on arXiv: 1802.05267

(“Reinforcement Learning with Neural Networks for Quantum Feedback”, Thomas Fösel, Petru Tighineanu, Talitha Weiss, Florian Marquardt)