Back to Blog
11 min read Alan Krishnamurthy

Transfer Learning from DFT to Experiment: Closing the Simulation Gap

Pre-training on DFT-computed properties and fine-tuning on experimental measurements: why it works, where it breaks, and how to know which regime you are in.

Abstract visualization of knowledge transfer between datasets

The most common situation we encounter when a new customer shares their data: they have somewhere between 80 and 300 experimental measurements for the property they care about, and nothing else. No simulation data, no literature-curated set, no domain-adapted model. Just their own lab notebook, digitized.

80-300 data points is not nothing, but it's not enough to train a graph neural network from scratch and get reliable predictions across a wide composition space. The model will memorize training examples and fail to extrapolate. You can regularize aggressively and get something, but the uncertainty estimates will be poorly calibrated and the accuracy on held-out compositions will disappoint.

Transfer learning from DFT-computed properties is one of the more practical ways to get around this. The idea is to pre-train a model on a large corpus of DFT data, then fine-tune on experimental measurements. You're betting that what the model learned from simulation, the chemical embedding, the bond geometry encoding, the element-distance interaction patterns, transfers usefully to the experimental domain. Often it does. Sometimes it doesn't, and knowing which situation you're in ahead of time saves weeks.

Why DFT data is valuable even when your target is experimental

DFT databases like Materials Project (now exceeding 150,000 relaxed inorganic structures) and OQMD contain computed properties: formation energy, band gap, elastic constants, magnetic moment. These aren't the properties your customers want to predict. Your customer wants experimental ionic conductivity, measured compressive strength, or electrochemical stability window.

But the DFT data does something important: it trains the model to encode chemical relationships. After pre-training on formation energy across 100,000+ diverse inorganic structures, a GNN's internal representations capture things like: which element substitutions tend to stabilize which crystal structure types, how atomic radius affects bonding geometry, which electronic configurations lead to open-shell instability. These representations are genuinely useful even when the downstream prediction target is experimental rather than computed.

The analogy to natural language pre-training is imperfect but instructive. A language model pre-trained on a large text corpus develops representations of word meaning and syntactic structure that transfer to downstream tasks with far less labeled data. DFT pre-training plays a similar role: it builds chemical representations that generalize.

The simulation gap and when it matters

The simulation gap is the systematic discrepancy between DFT-computed properties and experimentally measured ones. For formation energy, DFT (using GGA) typically underestimates formation energy of oxides relative to experimental values by a systematic offset that varies by chemistry. For band gaps, GGA-PBE is well-known to underestimate: silicon's experimental gap is 1.12 eV, GGA gives roughly 0.6 eV.

For transfer learning, what matters is not the gap in absolute values, but whether the relative ordering and the chemical sensitivity of the property is preserved between simulation and experiment. If DFT and experiment agree that replacing Ca with Sr in a cathode material increases the lattice parameter by roughly the expected amount, the model will transfer those geometric insights even if the absolute predicted value needs recalibration.

We've found that transfer learning works well when: (a) the property is a smooth function of composition and structure without abrupt phase-transition-dependent jumps, and (b) the chemistry space of the experimental data overlaps meaningfully with what's in the DFT pre-training corpus.

It works poorly when the experimental property is dominated by extrinsic factors not visible in equilibrium DFT structures. Fracture toughness is a good example: it depends on grain boundary chemistry, processing microstructure, and defect populations that pristine DFT structures don't capture. Pre-training on DFT formation energies for a fracture toughness prediction task adds almost no value.

How fine-tuning actually works

The mechanics of fine-tuning a GNN for materials are straightforward in principle. You take a model pre-trained on DFT data, strip or replace the output head (the final layer that maps the pooled graph embedding to a property value), and train the new head plus some portion of the backbone on experimental data.

The key decision is how much of the backbone to freeze versus fine-tune. The options form a spectrum. At one end: freeze everything except the output head. This is fast and avoids overfitting small experimental datasets, but it constrains the model to use representations built for DFT properties. At the other end: fine-tune all layers. This can adapt the representations fully to the experimental domain, but with 100 experimental examples you will overfit if you unfreeze all parameters.

In practice we use a gradual unfreezing schedule: train output head only for the first pass, then unfreeze the last message-passing layer, then optionally unfreeze earlier layers if validation loss continues to improve. A learning rate several times smaller than the pre-training learning rate (commonly 1e-4 vs. the 1e-3 pre-training rate) helps avoid destroying the pre-trained representations.

For datasets below roughly 150 experimental examples, we typically freeze the first two message-passing layers entirely. The representations learned there, encoding basic element interactions and bonding geometry, are generally more useful frozen than they are fine-tuned into noise.

A worked example: NMC cathode discharge capacity

To make this concrete: we worked with a dataset of 140 experimental discharge capacity measurements for NMC (nickel manganese cobalt) cathode materials, varying Ni:Mn:Co ratios across a systematic grid. The goal was to predict first-cycle capacity from composition for candidate NMC formulations outside the training grid.

A GNN trained from scratch on these 140 points achieved a mean absolute error of about 18 mAh/g on held-out compositions. Not terrible, but the uncertainty estimates were poorly calibrated: the model was overconfident on high-Ni compositions because the training set undersampled that region.

After pre-training on Materials Project formation energy data (all transition-metal-containing oxides in the database, roughly 12,000 structures) and fine-tuning on the same 140 experimental points, the MAE dropped to 11 mAh/g. More importantly, the uncertainty estimates became better calibrated, because the pre-trained model had seen the full composition space of NMC-adjacent oxides and could distinguish between known-well-represented and novel regions.

The improvement came mostly from better generalization at the edges of the training grid, where from-scratch models tend to extrapolate badly. The pre-trained model had learned that Ni-rich NMC shares structural motifs with other layered oxides it had seen at scale, which provided a useful inductive bias.

Negative transfer: when DFT pre-training hurts

This matters enough to address directly. Negative transfer happens when the pre-trained representations are actively misleading for the target task.

The clearest case we've seen: amorphous materials. DFT pre-training databases consist almost entirely of crystalline structures. Representations learned from crystalline periodicity don't transfer well to predicting properties of amorphous glasses or gels, where the relevant structure is short-range order without long-range symmetry. Fine-tuning on amorphous experimental data with a crystal-pre-trained backbone sometimes performs worse than training from scratch, because the model's structural priors actively mislead it.

A second failure mode is property mismatch at the physics level. DFT ground-state calculations don't capture finite-temperature effects or entropic contributions to properties. For high-entropy alloys where configurational entropy is the key design variable, a model pre-trained on zero-temperature DFT formation energies can develop representations that fight against learning entropy-dominated experimental observables.

The diagnostic we use: run the fine-tuning with and without pre-training on a small held-out validation set before committing to the full training run. If the pre-trained model isn't pulling ahead by epoch 20 of fine-tuning, it's probably not going to help, and training from scratch (with appropriate regularization) is the right call.

What Matforgelab does with this

We maintain a library of pre-trained models covering different inorganic chemistry subspaces: oxides, sulfides, halides, intermetallics. When a new customer brings experimental data, we benchmark which pre-training source provides the best validation-set accuracy on their specific task, then commit to that as the transfer backbone.

We're not claiming to have solved the simulation-to-experiment gap. DFT errors are real, the gap is real, and for some properties it's wide enough that pre-training doesn't help. What we're saying is that for compositionally diverse, structure-sensitive properties in inorganic materials with typical experimental dataset sizes (50-500 points), DFT-to-experiment transfer learning is worth attempting before concluding that you don't have enough data. In our experience, it cuts the effective data requirement roughly in half, which at $500-2000 per experimental measurement is a meaningful cost reduction per prediction quality unit.