MODULE 1 · FOUNDATIONS

Not all machine learning is the same. The three main types differ in one fundamental way: what information is available during training. This determines what kind of problem you can solve — and choosing the wrong type for your problem is one of the most common beginner mistakes.
🎯
Supervised
Learns from labelled examples. You provide both the input and the correct answer.
structure + known Eg → learn to predict Eg
🔍
Unsupervised
Finds hidden patterns in unlabelled data. No correct answers provided.
structures only → discover natural groups
🎮
Reinforcement
Learns by trial and error in an environment, guided by rewards and penalties.
try synthesis conditions → reward if stable

1. Supervised Learning — learning from labelled data

Supervised learning is by far the most widely used type in materials science. The word supervised means that a human (or a DFT calculation) has already provided the correct answers — called labels — for each training example.

📖 Formal definition

Given a training set {(x₁, y₁), (x₂, y₂), …, (xN, yN)}, learn a function f such that f(x) ≈ y for new, unseen inputs x.

Here x is the feature vector (structure) and y is the label (property).

Two sub-types of supervised learning

Sub-typeOutput typeMaterials exampleAlgorithms
Regression Continuous number Predict band gap (eV), formation energy (eV/atom), bulk modulus (GPa) Linear regression, SVR, neural networks, ALIGNN
Classification Discrete category Metal or insulator? Stable or unstable? Magnetic or non-magnetic? Logistic regression, SVM, random forest, CGCNN
🔬 DFT as supervisor

In your daily work, DFT acts as the "supervisor" — it provides the ground-truth labels. You run hundreds of WIEN2k or VASP calculations, collect the results (Eg, Ef, magnetic moment…), and these become the labelled training data for your ML model. DFT is expensive but reliable; ML is fast but needs DFT's guidance.

The workflow you already built in your MxCy pipeline — predicting electronic and magnetic properties from composition — is a perfect example of supervised regression: DFT values as labels, physics-motivated features as inputs.

2. Unsupervised Learning — finding hidden structure

Unsupervised learning works without any labels. The algorithm receives only the input data x and must discover meaningful patterns on its own. There is no "correct answer" to compare against.

📖 Formal definition

Given a dataset {x₁, x₂, …, xN} with no labels, find structure, patterns, or a compact representation of the data.

Main unsupervised tasks in materials science

TaskWhat it doesMaterials example
Clustering Groups similar materials together automatically Discover that your 500 compounds naturally fall into 4 structural families
Dimensionality reduction Compresses many features into 2–3 for visualisation PCA/t-SNE map of 50-feature crystal descriptors → 2D plot showing material families
Anomaly detection Identifies unusual data points Flag DFT calculations with suspiciously high energies — likely convergence errors
Generative models Learns to generate new examples Generate new stable crystal structures not in the training database
⚠️ No labels — no easy validation

Without labels, it is harder to measure how "good" an unsupervised model is. You cannot compute MAE or R². Instead you use domain knowledge: do the discovered clusters make physical sense? This requires your expertise as a materials scientist.

3. Reinforcement Learning — learning by trial and error

Reinforcement learning (RL) is the most different from the other two. There is no dataset at all — instead, an agent interacts with an environment, takes actions, and receives rewards or penalties.

📖 Formal definition

An agent in state s takes action a, transitions to state s', and receives reward r. The goal: learn a policy π(s) → a that maximises cumulative reward over time.

RL conceptMaterials science analogy
AgentThe optimisation algorithm
EnvironmentThe materials synthesis or simulation space
StateCurrent synthesis conditions (temperature, pressure, composition)
ActionChange a synthesis parameter
Reward+1 if material is stable and has target property, −1 otherwise
PolicyThe strategy: given current conditions, what to change next
💡 RL in materials science — current status

RL is the least mature of the three for materials applications. It is computationally expensive (requires many environment interactions) and difficult to set up. However, it is promising for inverse design — finding synthesis conditions that produce a material with target properties. For beginners, focus on supervised learning first.

How to choose the right type for your problem

Decision guide

❓ Do you have labelled data (known property values)?
↓ Yes                       ↓ No
❓ Predict a number or a category?
📊 Regression
e.g. band gap
🏷️ Classification
e.g. metal?
→ Supervised Learning
❓ Find patterns or generate new data?
🔍 Clustering / PCA
find groups
🎮 RL / generative
create new
→ Unsupervised / RL

Complete algorithm overview

AlgorithmTypeTaskMaterials use case
Linear RegressionSupervisedRegressionPredict formation energy from composition
Logistic RegressionSupervisedClassificationMetal vs insulator prediction
Random ForestSupervisedBothBand gap, stability, property screening
Support Vector MachineSupervisedBothPhase classification, property prediction
Neural NetworkSupervisedBothGeneral property prediction
CGCNN / ALIGNNSupervisedRegressionDFT property prediction from crystal graph
K-MeansUnsupervisedClusteringGroup crystals by structural similarity
PCAUnsupervisedDim. reductionVisualise high-dimensional material space
t-SNE / UMAPUnsupervisedDim. reduction2D maps of materials databases
VAE / GANUnsupervisedGenerativeGenerate new hypothetical crystal structures
Bayesian OptimisationRL-adjacentOptimisationActive learning for synthesis optimisation
⚗️ Where to focus as a beginner

Start with supervised learning — specifically regression. You already have DFT data (labels) and crystal structures (features). This maps directly onto your existing computational workflow. Posts 5–8 cover the core supervised algorithms in detail, always with materials science examples.

⚡ Interactive Companion App
ML Types Explorer
Explore all three ML types interactively — with live materials science examples.

Quick check

1. You want to predict the bulk modulus (GPa) of 1000 new perovskites using DFT-calculated values as training data. What type of ML is this?
2. You have 10,000 crystal structures with no property labels. You want to discover natural groupings. Which approach is correct?
3. Which ML type is MOST appropriate for a beginner materials scientist starting with DFT data?