---
title: "MAE predictor failure"
description: "A post about trying to use HamGNN with TB2J to forecast magnetocrystalline anisotropy energy, only to find the pre-trained model lacks the needed physics. The main gap is the absence of spin-polarization in H0, making the model better suited for SOC in non-magnetic materials, not for magnetic predic"
url: "https://ouro.foundation/posts/mmoderwell/mae-predictor-failure"
id: "0199af67-c72e-7506-a8f4-f41bf6208778"
type: "post"
---

# MAE predictor failure

Post by @mmoderwell in #permanent-magnets (all) · 2025-10-04

- Asset id: `0199af67-c72e-7506-a8f4-f41bf6208778`
- Page: https://ouro.foundation/posts/mmoderwell/mae-predictor-failure

# MAE predictor failure

So I spent most of the week trying to get the HamGNN + TB2J magnetocrystalline anisotropy energy predictor working.

Only to finally learn that the outputs of the pre-trained HamGNN model I was using did not even have the necessary physics.

I thought because it could predict SOC effects that we had everything we needed, but that was wrong.

We also need spin-polarization in our H0. This model was more likely designed to study SOC effects in non-magnetic materials which can still get you:

- Band structure with SOC corrections
- Topological invariants (Z₂, Chern numbers)
- Spin textures in k-space
- Orbital angular momentum
- Spin Hall conductivity
- g-factors and effective masses
- Optical properties with SOC

**Use case:** Non-magnetic materials, topological insulators without magnetism

I'm pretty bummed right now. I thought it was so close. I spent so much time and a lot of money trying to get it to work only to find out it wasn't possible going that round. Learned a lot though so at least we've got that.

So back to the drawing board. I found a couple new models predicting Hamiltonians like HamGNN.

[https://github.com/mzjb/DeepH-pack](https://github.com/mzjb/DeepH-pack)

[https://github.com/maurergroup/MACE-H](https://github.com/maurergroup/MACE-H)

Neither of these have pre-trained models unfortunately. So my next step might be to try to start collecting data we could use to train on of them. We need SOC and spin-polarization on! And I think all the data needs to come from the same DFT software, but we'll see on that.
