Scientific AI Hamprecht Lab, IWR, Heidelberg University

Machine Learning and Physics

Prof. Fred Hamprecht

Modern physics (and many other fields) is now unthinkable without machine learning / AI. This course teaches

Physics of Machine Learning – the physical ideas inside ML: energy and force, temperature and thermal fluctuations, diffusion, symmetry

Machine Learning for Physics – the tools physicists use today, including honest error bars (uncertainty quantification), fast stand-ins for slow simulations (learned surrogates), generative models, and parameter estimation when only a simulator is available (simulation-based inference).

Exercises are an important element of the course. They are part pen-and-paper, part programming with AI coding assistants, where you verify and interpret what they produce.

figure image

Provisional Curriculum

  1. Introduction; principal component analysis
  2. Robust statistics; nonlinear dimension reduction (t-SNE, UMAP)
  3. Density estimation; mean shift
  4. Linear regression and inverse problems
  5. Regularized regression: ridge, lasso, compressed sensing
  6. Statistical decision theory; discriminant analysis
  7. Decision trees, random forests, cross-validation
  8. Kernel methods, Gaussian processes, Bayesian optimization
  9. Logistic regression, softmax, generalized linear models
  10. Multi-layer perceptrons; double descent
  11. Training neural networks I: architecture, losses, regularization, normalization
  12. Training neural networks II: SGD, Adam, backpropagation
  13. Uncertainty quantification and calibration
  14. Convolutional networks
  15. Physics-informed neural networks, neural operators, PDE foundation models
  16. Representation learning: autoencoders and self-supervised learning
  17. Graph neural networks
  18. Attention and transformers
  19. Large language models
  20. AI safety, alignment, interpretability
  21. Diffusion and score-based models
  22. Normalizing flows, neural ODEs, flow matching
  23. Simulation-based inference
  24. Equivariant message-passing networks
  25. Molecular machine learning
  26. Q&A

Where and when

The lectures take place on Tuesdays and Thursdays from 9h15 until 11h00 in Großer Hörsaal, Philosophenweg 12. The first lecture is on Tuesday, 13 October 2026.

The tutorials start with a tooling session in the first week of the semester. Unless you are familiar with Python, Git, VS Code and AI coding agents, please take part to help you solve the computational exercises.

FAQ

Q: Do I need prior knowledge in machine learning?
A: No.

Q: I just want to learn the basics. Is this the right course?
A: The course has a steep learning curve and entails significant workload. If you only want to cover the basics, please check for slower-paced alternatives such as the “Machine Learning Essentials”.

Q: Is this course about deep learning?
A: Neural networks will play an important role; but this course is more about principles. While we will discuss architectural elements such as transformers, this course is not a detailed review of the latest architectures.

Q: Will this course be repeated next year?
A: Yes, like every MSc core course.

Q: Is this course open for students from other faculties?
A: Yes, but the last fifth in particular will require substantial effort if you come from outside physics.

Q: Is there a text book?
A: The course does not follow any single textbook, but the following are good sources: Hastie, Tibshirani, Friedman: The Elements of Statistical Learning; Bishop and Bishop: Deep Learning: Foundations and Concepts; Prince: Understanding Deep Learning; and, for the lectures on diffusion and flows, Holderrieth and Erives: An Introduction to Flow Matching and Diffusion Models.

Q: Exam modalities?
A: Admission to the written exam requires deliverables during the semester. Details will be discussed in week two.