---
title: 'ALIGNN-FF: A Unified Machine-Learned Force Field'
url: https://www.emergentmind.com/topics/machine-learned-force-fields-alignn-ff
type: topic
---

# ALIGNN-FF: A Unified Machine-Learned Force Field

Machine-learned force fields (MLFFs) are data-driven interatomic models that leverage large quantum-mechanical datasets to predict atomic energies and forces with high fidelity and computational efficiency. The Atomistic Line Graph Neural Network Force Field (ALIGNN-FF) represents a unified, graph neural network–based MLFF capable of modeling both structurally and chemically diverse materials across 89 elements. ALIGNN-FF couples property prediction with force derivation, combining explicit chemical encoding through graph construction with global differentiability for energy-conserving simulations. It is trained predominantly on bulk equilibrium structures, enabling rapid geometry optimization and property analysis, but faces limitations in handling out-of-equilibrium configurations. 

## 1. Architecture and Algorithmic Structure

ALIGNN-FF operates by mapping atomistic crystal structures to property predictions through a two-level graph neural network architecture. Starting from a periodic crystal, ALIGNN-FF builds an undirected atomistic graph $G = (V, E)$ where nodes represent atoms and edges connect each atom to its 12 nearest periodic neighbors with a radial cutoff of approximately 8 Å. Each atom-node $i$ carries a 9-dimensional feature vector encoding fundamental chemical properties (e.g., electronegativity, group number, covalent radius, valence electrons, ionization energy, electron affinity, block, atomic volume). Edges are featurized by radial basis expansions of the interatomic distance $r_{ij}$:
$$
e^0_{ij} = [\exp(-\gamma_k (r_{ij} - \mu_k)^2)]_{k=1 \ldots K}
$$
A line graph $L(G)$ is then constructed over the edges, with nodes as bonds and adjacency defined by shared atoms; features on the line graph capture bond angles $a^0_{(i \to j),(j \to k)} = \mathrm{angle}(i-j-k)$.

ALIGNN-FF alternates message passing between the atomistic graph and line graph (for angles), using small multilayer perceptrons (MLPs) for updates. At each layer $\ell$, bond and atom features are iteratively updated through neighbor aggregation both over bonds (on $L(G)$) and atoms (on $G$). Final atom embeddings $\{ h^L_i \}$ after $L$ layers are pooled and mapped by a readout MLP to yield the per-cell total energy:
$$
E_{\mathrm{pred}} = \frac{1}{N_{\mathrm{atoms}}} \cdot \Phi_{\mathrm{readout}} \left( \sum_i h^L_i \right)
$$
Forces are computed by exact differentiation:
$$
F_i = -\frac{\partial E_{\mathrm{pred}}}{\partial r_i}
$$
As a consequence, the predicted forces are energy-conserving by construction [2209.05554].

## 2. Training Protocol and Dataset

ALIGNN-FF is trained primarily using the JARVIS-DFT dataset which includes $\sim$75,000 distinct materials and approximately 4 million energy-force entries at the OptB88vdW/DFT level of theory. For training, a curated subset of 307,113 snapshots is sampled from relaxation trajectories (first, middle, last, max-energy, and min-energy per trajectory). Data is split into train/validation/test as 90%/5%/5% (approximately 276k/15k/15k structures). 

The loss function balances energy and force prediction:
$$
L = | E_{\mathrm{DFT}} - E_{\mathrm{GNN}} | + w \cdot \sum_{i=1}^{N_{\mathrm{atoms}}} | F^{\mathrm{DFT}}_i - F^{\mathrm{GNN}}_i |
$$
with $w = 10$ set to equalize scales between energy and force errors ($\sim$0.1 eV/Å for forces, $\sim$1 eV for energy). Training employs AdamW optimizer (lr$_0$ = $10^{-3}$, weight decay $10^{-5}$), batch size 32, dropout 0.2, 6 ALIGNN layers (hidden dimension 128, SiLU activation), with ReduceLROnPlateau learning-rate scheduling and early stopping on validation MAE. For benchmarking in the CHIPS-FF suite [2412.10516], an 8-layer variant is also used with a reduced cutoff radius of 6 Å.

## 3. Physical Constraints and Differentiability

ALIGNN-FF enforces energy conservation by computing forces via analytic gradients of the differentiable energy functional with respect to atomic positions. The virial stress tensor is obtained (for volume-conserving cells) from
$$
\sigma_{\alpha \beta} = -\frac{1}{V} \sum_{i < j} F_{ij,\alpha} r_{ij,\beta}
$$
where kinetic contributions may be included as needed.

This explicit gradient coupling ensures that forces are physically consistent with the learned potential surface, a key requirement for molecular dynamics (MD) and structural relaxation workflows. However, the strict reliance on differentiability can limit performance in regions not represented in the training data (surfaces, defects, dynamic disorder) [2209.05554, 2412.10516].

## 4. Performance Benchmarks and Comparative Metrics

### 4.1 Direct Test Set Metrics

Key quantitative metrics on 5% held-out test snapshots from the JARVIS-DFT-based ALIGNN-FF DB include:
- Energy MAE: 0.086 eV/atom
- Force MAE: 0.047 eV/Å per component
- Lattice constant MAEs (after full relaxation, $\leq$10 atoms, $\sim$23,495 structures): 0.11, 0.11, 0.13 Å (a, b, c)
- Formation energy MAE: 0.08 eV/atom

On a larger set of crystallography open database (COD) structures ($\leq$50 atoms, $\sim$34,615 structures), lattice constant MAEs are 0.20, 0.20, 0.23 Å. Evaluation speed per energy/force step is approximately 1 ms/step on CPU (vs. DFT $\sim$100 ms/step; EAM $\sim$0.1 ms/step) [2209.05554].

A weight-factor ablation study indicates the force MAE can be reduced at the expense of energy MAE by adjusting $w$, but the default $w=10$ achieves a balance (force MAE 0.047 eV/Å, energy MAE 0.086 eV/atom).

### 4.2 CHIPS-FF Universal Benchmarking

In CHIPS-FF [2412.10516], ALIGNN-FF is evaluated alongside 15 universal MLFFs for semiconductor-relevant tasks. Relevant results include:

| Metric                                  | ALIGNN-FF         | CHGNet        | MACE-MPA-0      |
|------------------------------------------|-------------------|---------------|-----------------|
| Bulk relaxations: unconverged (%)        | 6                 | 0             | 0               |
| Surface relaxations: unconverged (%)     | 44                | 0             | 0               |
| Vacancy relaxations: unconverged (%)     | 35                | 0             | 0               |
| Lattice MAE (Δa, Δb, Δc, Å)              | 0.011–0.014       | 0.036–0.072   | 0.040–0.084     |
| C$_{11}$/C$_{44}$ MAE (GPa)              | 196 / 74          | 59 / 46       | 35 / 34         |
| Phonon band MAE (cm$^{-1}$ at 0.01 Å)    | 157               | 83            | 60              |
| Force MAE on JARVIS-FF DB (eV/Å)         | 0.472             | 0.060         | 0.039           |
| Structural + elastic CPU time (s/mat)    | 318               | 136           | 263             |

ALIGNN-FF demonstrates exceptional lattice parameter prediction in equilibrium bulk crystals with lowest MAE but exhibits high error rates and failure frequencies for surface/vacancy relaxations and poor force/elastic/phonon accuracy compared to CHGNet and MACE.

### 4.3 Materials-Specific and Out-of-Equilibrium Properties

ALIGNN-FF matches DFT-derived energy–volume curves for select binaries and oxides (e.g., Ni$_3$Al, NaCl, BaTiO$_3$) near equilibrium, with accurate polymorph ranking (sub-meV errors). For amorphous Si, the radial distribution function is reproduced comparably to leading universal models, supporting some MD transferability. However, vacancy energy MAE is $\sim$0.36 eV, and surface energy error $\sim$0.16 J/m$^2$, both exceeding leading MLFFs [2412.10516]. Force MAEs outside the native training domain are higher (e.g., 0.22 eV/Å for Cu, 0.32 eV/Å for Si).

## 5. Application Domains and Example Workflows

ALIGNN-FF is integrated with Python and ASE for direct structure optimization, alloy search, and MD workflows:

- **Geometry optimization:** Fast relaxation of large COD structure sets, e.g.,
  ```python
  from alignn_ff import ALIGNNCalculator
  from ase import Atoms
  from ase.optimize import FIRE
  atoms = read_cif('example.cif')
  atoms.calc = ALIGNNCalculator(model='alignn-ff-unified')
  dyn = FIRE(atoms, logfile=None, trajectory=None)
  dyn.run(fmax=0.05)
  ```
- **Genetic-algorithm alloy search:** Fitness by ALIGNN-FF energy after relaxation drives evolutionary schema; convex hulls match AB/A$_3$B DFT/experiment.
- **MD (NVT) simulations:** Tested for interface stability and thermalization at 300 K; some transferability to melt–quench scenarios.

High-throughput optimization and screening are effective for bulk materials within the distribution of the training dataset. However, large convergence failures are observed for defects, surfaces, and out-of-equilibrium structures, limiting robustness for these domains [2209.05554, 2412.10516].

## 6. Limitations and Prospective Developments

ALIGNN-FF constitutes the first demonstration of a unified GNN force field spanning most of the periodic table without handcrafted descriptors. Its strengths include
- Robust equilibrium geometry prediction ($\leq$0.01–0.02 Å lattice MAE)
- Speed and scalability (1 ms/step energy/force evaluation)
- Usability for high-throughput and pre-screening workflows
- No need for element-specific retraining

Nevertheless, limitations include
- Training data restricted to perfect bulk/elastic DFT snapshots, with no defect, surface, or magnetic configurations
- Elevated MAE ($\sim$86 meV/atom) relative to chemistry-specific MLFFs ($\sim$1–10 meV/atom)
- Moderate to poor force accuracy in out-of-equilibrium conditions (up to 0.5 eV/Å MAE)
- High failure rates on surfaces and vacancies (unconverged in 44% and 35% of cases, respectively in CHIPS-FF)
- High computational cost relative to some invariant or specialized MLFFs [2412.10516]

Potential improvements, as identified in benchmarking and original works, include
- Data augmentation with strained, surface, and defect snapshots to enhance universality
- Incorporation of dispersion corrections for van der Waals and layered systems
- Adoption of uncertainty quantification to flag high-error prediction regimes
- Explicit enforcement of rotational and reflectional equivariance (E(3)-invariant GNNs)
- Hybridization with tight-binding methods to unify classical and quantum property spaces [2209.05554, 2412.10516]

## 7. Comparative Perspective and Impact

ALIGNN-FF sets a reference for universal graph-based MLFFs applicable to much of the periodic table and large-scale screening applications. In benchmarking suites such as CHIPS-FF, it outperforms other contemporary models (CHGNet, MACE, ORB, etc.) only in equilibrium bulk lattice metrics. For elastic constants, phonons, defects, and finite-temperature dynamics, specialized models with tailored or expanded training regimes currently yield lower errors and higher reliability.

This delineates the present boundary for "unified" MLFFs: exceptional interpolation within a well-sampled equilibrium domain, but less effective generalization to high-strain, surface, vacancy, and dynamic conditions. *A plausible implication is that future versions of ALIGNN-FF, trained with deliberately expanded datasets and explicit physical constraints, could approach the broader generalizability required for device-level modeling and materials discovery workflows* [2412.10516].

Source: https://www.emergentmind.com/topics/machine-learned-force-fields-alignn-ff