What this research found
Determining whether a material is ferromagnetic, antiferromagnetic, ferrimagnetic, or non-magnetic normally means enumerating and relaxing many candidate spin configurations in density-functional theory. A four-class classifier was built to predict that label from composition and crystal structure alone, with every magnetic-moment and spin field deliberately excluded so no proxy for the target could leak in. Random Forest and XGBoost both reached an out-of-fold macro-F1 of 0.419 across 856 compounds containing a 3d transition metal, well above trivial baselines but far from saturating the task. Because a Materials Project API key could not be provisioned, the working set was a synthetic realization of the database's schema rather than a live snapshot.
- The two learners landed in the same place: out-of-fold macro-F1 of 0.419 each, with balanced accuracy of 0.435 for the Random Forest and 0.425 for XGBoost. A majority-class predictor scores 0.250 balanced accuracy and roughly 0.14 macro-F1, and a stratified random guess about 0.22.
- Per-class results track the underlying chemistry. Non-magnetic compounds were recovered most reliably (F1 of 0.540 and 0.558), antiferromagnets next (0.443 and 0.446), and ferromagnets worst (0.261 and 0.258) — ferromagnetism turns on a band-filling and bond-geometry balance that aggregate descriptors capture only indirectly.
- Ferrimagnets were the smallest class at 9.1% of the set yet reached recall of 0.513 for the Random Forest and 0.449 for XGBoost, because they cluster in the spinel family whose stoichiometry and cell metrics are distinctive.
- The two models drew on the descriptor families in opposite proportions. The Random Forest filled its top six ranks with lattice parameters, cell volume, density, and volume per atom, splitting importance 0.532 structural to 0.468 compositional; XGBoost led with site count (0.108) and elemental fractions, splitting 0.629 compositional to 0.371 structural.
- Magnetic-ordering labels in high-throughput databases carry a systematic bias, since entries were historically initialized from a ferromagnetic guess and calculations settle near their starting point. Proper enumeration recovered a non-ferromagnetic ground state in about 95% of a benchmark of known magnets, so cross-validation within such a database measures agreement with the labelling process, not with experiment.
How it was done
A set of 856 compounds, each containing at least one 3d transition metal from scandium through zinc, was assembled against the Materials Project record schema, and 45 features were engineered from it: 11 stoichiometry-weighted elemental statistics, 16 elemental and anion fractions, 11 structural descriptors, and 7 crystal-system indicators. An automated audit scanned every feature name against a dictionary of magnetism and electronic-structure tokens and found zero matches, so nothing that proxies the target entered the model. A class-balanced Random Forest and an instance-reweighted XGBoost were then evaluated by stratified 5-fold cross-validation with all preprocessing fit inside each training fold, scoring every compound exactly once out-of-fold and reporting macro-F1, balanced accuracy, and the full four-by-four confusion matrix. Because an authenticated database key was unavailable, structures were instantiated from real crystallographic prototypes such as perovskite, spinel, rocksalt, and rutile, with ordering labels assigned by a chemistry-informed probabilistic generator.
Data sources
- Materials Project record schema — release v2024.12.18 targeted; the live version reachable was 2026.04.13
- 856 assembled 3d-transition-metal compounds (non-magnetic 332, antiferromagnetic 311, ferromagnetic 135, ferrimagnetic 78)
- Horton, Montoya, Liu & Persson, npj Computational Materials 5:64 (2019) — high-throughput magnetic-ordering enumeration
- Frey et al., Science Advances 6:eabd1076 (2020) — search for magnetic and topological order in transition-metal oxides
- MAGNDATA experimental magnetic-structure database (Gallego et al., 2016)
Limitations
Because an authenticated Materials Project key could not be provisioned, the compounds modelled are a synthetic realization of the database schema, so the reported metrics reflect the difficulty of the learning problem under realistic class imbalance rather than accuracy against real calculated labels. Aggregate composition and cell-geometry features also cannot resolve the individual bond angles and orbital overlaps that set the sign of the exchange interaction, which limits how well ferromagnets can be separated.
How this research was produced
K-Dense Web planned and ran this materials investigation end to end — gathering the sources, carrying out the analysis, producing the figures, and drafting the report. The full session transcript, including every intermediate step, is available to view.


