Ai4MatLectures

PyTorch teaching notebooks for materials science

Teaching notebooks for the ECLIPSE Lab lecture triad at FAU Erlangen-Nürnberg. Install the package:

pip install git+https://github.com/ECLIPSE-Lab/Ai4MatLectures.git "mdsdata>=0.1.5"

Live (braided) weekly notebooks

These are the canonical in-class notebooks — one homework + one main file per week, braiding the matching MFML and ML-PC units. Run them as Python scripts (Jupytext cell markers).

Week Topic Homework Main (90 min)
3 Loss minimization & leakage week3_homework.py week3_loss_and_leakage.py
4 Architecture & representation week4_homework.py week4_architecture_and_representation.py
5 Clustering & autoencoders week5_homework.py week5_clustering_and_autoencoders.py
6 Optimization & fine-tuning week6_homework.py week6_optimization_and_finetuning.py
7 Generalization, ensembles & distribution shift week7_homework.py week7_generalization_and_ensembles.py
8 Uncertainty, robustness & graph-based crystal reps week8_uncertainty_and_robustness_homework.py week8_uncertainty_and_robustness.py
9 Latent geometry — PCA, t-SNE, probing, contrastive week9_homework.py week9_latent_geometry.py
10 Attention, ViT & cross-system transfer week10_homework.py week10_attention_and_transfer.py
11 Generative inverse design (VAE, CVAE, DDPM) week11_homework.py week11_generative_inverse_design.py
12 Uncertainty, GPs & discovery week12_homework.py week12_uncertainty_and_discovery.py
13 Physics-informed learning, GPs & active discovery week13_homework.py week13_physics_and_gp.py
14 Explainability, limits & course retrospective week14_homework.py week14_explainability_and_limits.py

MFML — Mathematical Foundations of AI & ML

Week Topic Dataset Notebook
4 NN architecture & backprop Iris / Alpaydin Digits week04_classifier_iris, week05_backprop_digits
5 Clustering & autoencoders Nanoindentation / Ising full braided: week5_clustering_and_autoencoders.py; per-course: week11_clustering_nanoindentation, week10_autoencoder_ising_full
7 Generalization, regularization & tree ensembles Ising light / Tensile / SOAP braided: week7_generalization_and_ensembles.py; per-course: week07_overfitting_ising_light
8 Probabilistic view, MLE/MAP, calibration Tensile / 1-D toy braided: week8_uncertainty_and_robustness.py (Blocks 2–5)
10 Latent spaces & embeddings Ising full week10_autoencoder_ising_full
11 Unsupervised learning (deep dive) Nanoindentation week11_clustering_nanoindentation
12 Uncertainty in predictions (GPs) Tensile / 1-D toy braided: week12_uncertainty_and_discovery.py

MLPC — ML in Materials Processing & Characterization

Week Topic Dataset Notebook
4 Microstructure representations & CNN baseline Alpaydin Digits / Ising week04_baseline_digits, week05_cnn_ising_light, week05_cnn_ising_full
5 Unsupervised learning in materials Ising / Cahn-Hilliard / NEU-DET / ESTM braided: week5_clustering_and_autoencoders.py; per-course: week05_clustering_estm, week05_clustering_neu_det, week11_anomaly_cahn_hilliard
7 Time-series / process monitoring (lecture cancelled — Pfingstdienstag) Tensile Test supplementary: week07_process_monitoring_tensile; the cross-T generalisation block in week7_generalization_and_ensembles.py also previews the Week 8 lecture
8 Generalization, robustness & process windows (exercise cancelled — Fronleichnam) Tensile Test braided self-study: week7_generalization_and_ensembles.py (Blocks 2–5) and week8_uncertainty_and_robustness.py (Blocks 6–7, sensitivity + process windows)
11 Anomaly detection via AE (automation context) Cahn-Hilliard week11_anomaly_cahn_hilliard
12 UQ + Bayesian active learning Tensile Test braided: week12_uncertainty_and_discovery.py (Blocks 2–4)
13 MC-Dropout segmentation UQ (self-study — lecture cancelled 07.07) MetalDAM week13_mcdropout_metaldam

MG — Materials Genomics

Week Topic Dataset Notebook
5 Descriptors + regression Chemical Elements week05_descriptors_elements
6 Local atomic envs (SOAP) & universal MLIPs (MACE-MP-0) — Unit 6 after the u06↔︎u07 swap ASE bulk prototypes (Cu/Fe/Al/Si/NaCl/MgO) braided: week6_optimization_and_finetuning.py (Block 6 — frozen-SOAP regression + MLIP-as-pretrained-backbone); per-course standalone: week06_soap_and_mace (SOAP + MACE-MP-0 EOS benchmark + MLIP-MD)
7 Lecture cancelled (Pfingstdienstag) — descriptor recap now lives in Week 6
8 Graph-based crystal representations (Unit 7) — Week 8 after the u06↔︎u07 swap CrystalGraphs (toy) + PBC graphs braided anchor: week8_uncertainty_and_robustness.py (Blocks 8/8b — TinyCGNN, PBC neighbour search, RBF + cutoff artifact, ranking metrics)
9 Regression & generalization in materials data Nanoindentation week09_regression_nanoindentation
11 Latent space (Ising) Ising light week11_latent_ising
11 Materials latent space Cahn-Hilliard week11_latent_cahn_hilliard
12 Clustering vs discovery + per-cluster GPs Nanoindentation braided: week12_uncertainty_and_discovery.py (Blocks 5–6)