Science and engineering

Machine learning for materials science

Materials scientists use machine learning to predict properties such as band gap, stability and strength from composition or crystal structure, to screen large candidate spaces before simulation or synthesis, and to analyse microscopy images.

How machine learning is used in materials science

Predicting properties from crystal structure

Graph networks treat a crystal as atoms connected by bonds and learn to predict properties such as formation energy, band gap or elastic moduli. Trained on computed databases, they score a structure in milliseconds instead of hours of simulation.

Real exampleCrystal Graph Convolutional Neural Networks (Xie and Grossman, 2018)Introduced a crystal graph convolutional network that learns material properties directly from the connection of atoms in a crystal, with interpretable contributions from local environments.

Screening for new stable materials

Fast models screen millions of hypothetical compositions and structures for stability, and only the most promising go on to DFT calculations or synthesis.

Real exampleGNoME (Google DeepMind, 2023)Google DeepMind reported 2.2 million new crystals found with its GNoME deep learning tool, including 380,000 predicted to be stable.

Comparing models fairly

Shared benchmarks give every model the same tasks and data splits, from computed formation energies to experimental properties, so progress can be measured rather than claimed.

Real exampleMatbench (Dunn et al., npj Computational Materials, 2020)Introduced the Matbench test set for materials property prediction, with the Automatminer automated pipeline as a reference algorithm.

Analysing microscopy

Networks detect atoms, defects and phases in electron microscopy images and movies, turning hours of manual annotation into automated, quantitative analysis.

Real exampleDeep learning analysis of defects in WS2 (Maksov et al., npj Computational Materials, 2019)Applied deep learning to electron microscopy data to track defect and phase evolution in WS2 during electron beam-induced transformations.

Can you learn machine learning for materials science?

Yes. Materials scientists can learn the needed machine learning in stages: Python and data handling, materials-specific tools such as pymatgen, classical models on composition features, then graph neural networks on structures.

  1. PythonWrite analysis scripts; pymatgen and ASE, the main structure libraries, are Python packages.Learn it in Python
  2. Data handlingClean composition and property tables and join data from different sources with pandas.Learn it in Data Tools
  3. Materials data and featuresQuery the Materials Project, handle structures with pymatgen and compute features with matminer.
  4. Classical machine learningGradient boosting on composition features is a strong first baseline on Matbench tasks.Learn it in Machine Learning
  5. Graph neural networksCrystal graph networks and machine-learned potentials for structure-based prediction.Learn it in Deep Learning

Moving into machine learning for materials science

If you already work in the field

Materials scientists know synthesis, characterisation and which properties matter in practice. Add Python and pymatgen, reproduce a Matbench task, then apply the same workflow to your own measurements. Battery, semiconductor and chemical companies and national laboratories hire for materials informatics.

If you come from data science or ML

Machine learning practitioners should learn crystal structures, thermodynamic stability and the basics of DFT, since most training labels are computed rather than measured. Materials Project tutorials and an introductory solid-state text cover the essentials.

Roles that do this workMaterials informatics scientistComputational materials scientistMachine learning scientist, materials discoveryResearch scientist, battery materials

Tools you will use

ToolWhat you use it for
pymatgenRepresent crystal structures and compositions and query materials databases.
matminerTurn compositions and structures into feature tables and load materials datasets.
ASEBuild atomic structures and run calculations that provide training labels.
scikit-learnTrain composition-based property regressors and baselines.

Public data to practise on

  • Matbench: Standard materials property prediction tasks, computed and experimental, with fixed cross-validation folds.
  • Materials Project: Computed structures and properties for a large set of inorganic materials via API; free registration for an API key.

Your first project

Download the Matbench experimental band gap task, predict band gap from matminer composition features with a random forest, and compare it with a mean-value baseline using MAE on Matbench's folds.

Common questions

What is materials informatics?

Materials informatics applies data science and machine learning to materials data: predicting properties, screening candidates and guiding experiments. It builds on large databases such as the Materials Project.

Can machine learning discover new materials?

It can propose candidates that are likely to be stable or useful much faster than computation alone. A material is only discovered once it is made and measured, so machine learning narrows the search rather than replacing experiments.

Do I need to know DFT to work in materials machine learning?

It helps a lot, because most large training datasets come from DFT and its errors carry into the models. You do not need to develop DFT codes, but you should understand what the calculations mean.

Which Python libraries are used in materials machine learning?

pymatgen and ASE for structures, matminer for features, scikit-learn for classical models and PyTorch-based packages for graph networks and interatomic potentials are common.

Courses for these skills

New to programming or maths? Start with Python, or follow the machine learning path in order. Published lessons are free to read; compare Free and Pro.