---
title: "Notes on MatterSim"
url: "https://ouro.foundation/posts/mmoderwell/notes-on-mattersim"
id: "0194658f-8ce6-793f-adf6-44d178128b83"
type: "post"
---

# Notes on MatterSim

Post by @mmoderwell in #materials-science (all) · 2025-01-14

- Asset id: `0194658f-8ce6-793f-adf6-44d178128b83`
- Page: https://ouro.foundation/posts/mmoderwell/notes-on-mattersim

# Notes on MatterSim

Good read. Well written, very detailed and thorough. Great contribution.

> Embedded file: [MatterSim](https://ouro.foundation/files/mmoderwell/mattersim)

- [Repo](https://github.com/microsoft/mattersim)
- [Paper](https://arxiv.org/abs/2405.04967)

Collaborated with Claude on these notes, but it still contains the essence of my thoughts on the paper.

---

### Dataset Creation & Innovation

The authors recognized a critical limitation in existing materials databases - they mostly contain structures near equilibrium, making them poor at predicting behavior under extreme conditions. Their solution was a two-part data generation strategy:

1. Ground-state explorer: Focuses on equilibrium structures
2. Off-equilibrium explorer: Samples configurations under high temperatures (up to 5000K) and pressures (up to 1000 GPa)

They used active learning with ensemble uncertainty to guide the data collection, resulting in ~17M structures. This is far more comprehensive than previous databases, especially for extreme conditions.

> Embedded file: [MatterSim is developed on an enriched materials space](https://ouro.foundation/files/mmoderwell/mattersim-is-developed-on-an-enriched-materials-space)

### Performance vs Other MLFFs

When compared to leading models like CHGNet and MACE-MP-0, MatterSim shows dramatic improvements:

- Up to 10x better accuracy on structures under extreme conditions
- Significantly better performance on the MPF-TP and Random-TP benchmark sets
- Superior ability to handle complex molecular dynamics simulations

> Embedded file: [Performance of MatterSim on benchmark datasets](https://ouro.foundation/files/mmoderwell/performance-of-mattersim-on-benchmark-datasets)

### End-to-End Property Prediction with Graphformer

The Graphformer version of MatterSim is particularly interesting for direct property prediction.

From S15.2:

> After the message passing in M3GNet or structure encoder in Graphormer, we obtain a global representation of a structure using scatter operation to aggregate the node feature... With two different reduction methods, mean or summation, we obtain the readout vectors of a given material, which will be subsequently sent to a multi-layer perceptron (MLP) to make direct property predictions

On the MatBench tasks, it achieved state-of-the-art performance across multiple properties:

> Embedded file: [ Performance comparison of M3GNet and Graphormer as end-to-end models](https://ouro.foundation/files/mmoderwell/performance-comparison-of-m3gnet-and-graphormer-as-end-to-end-models)

### Current Limitations & Open Source Status

[GitHub repo](https://github.com/microsoft/mattersim)

This is a very recent release (May 2024), and the open source implementation is still incomplete. While the base M3GNet version is available, several key components are missing:

- The Graphformer version of the model isn't available yet
- Fine-tuning scripts haven't been released
- The full active learning pipeline isn't published
- The data generation tools aren't included

This means that while the research results are impressive, practitioners currently can't access the full capabilities described in the paper. The available M3GNet version, while still powerful, doesn't match the performance of the Graphformer version on end-to-end property prediction tasks.

The missing Graphformer implementation is particularly significant because it's the version that achieved the best results on many tasks, especially direct property prediction. For instance, in predicting phonon properties, the Graphformer version achieved an MAE of 26.02 cm⁻¹ compared to M3GNet's 56.04 cm⁻¹.

The fine-tuning capabilities are also crucial, as they enable adaptation to new tasks with minimal data. For example, the paper demonstrates adapting to liquid water simulation with only 3% of the data needed for training from scratch, but these tools aren't yet available to the community.

There's also a clear incentive to use Microsoft's Azure environment for more advanced functionality. From the repo:

> More advanced and fully-supported pretrained versions of MatterSim, and additional materials capabilities are available in [Azure Quantum Elements](https://quantum.microsoft.com/en-us/solutions/azure-quantum-elements).

As impressive as this contribution is, I don't think it's worth pursuing further until the repo matures. I'll be evaluating ORB as an alternative.

## Assets in this post

- [MatterSim](https://ouro.foundation/files/mmoderwell/mattersim) (file, id `4b12f307-5614-4c66-9676-134c5f2dfb80`)
- [MatterSim is developed on an enriched materials space](https://ouro.foundation/files/mmoderwell/mattersim-is-developed-on-an-enriched-materials-space) (file, id `3c10e687-67dc-4b59-93ea-7817a10b9070`)
- [Performance of MatterSim on benchmark datasets](https://ouro.foundation/files/mmoderwell/performance-of-mattersim-on-benchmark-datasets) (file, id `66051e26-b732-421d-8bfa-46487f452e73`)
- [ Performance comparison of M3GNet and Graphormer as end-to-end models](https://ouro.foundation/files/mmoderwell/performance-comparison-of-m3gnet-and-graphormer-as-end-to-end-models) (file, id `ed2c08d9-6429-48f7-b318-6024b13cc4fb`)
