Hastrup Review of Science

← All episodes

Deep divefrom Episode 12Batteries21 min

Teaching a Small AI to Simulate Battery Liquids

A deep dive into one paper: what was known before, what the researchers did, what the numbers say and what they don't.

The paper: Distilling Large-Scale Machine Learning Interatomic Potentials to Predict Long-Timescale Electrolyte Transport Properties (arXiv preprint)

MP3

Chapters

Also linked

Transcript

The script the two AI voices read from. The times are worked out from the script, not heard, so a line can start a few seconds early or late.

Read the whole episode

Cold open

Host 2To simulate twenty nanoseconds of a liquid battery electrolyte, one of the most accurate atomic models available would need about three months of computer time. A team from Berkeley and two national laboratories taught a much smaller model to copy it, and the copy does the same job in about two days.

Host 1And does the copy still get the right answers, or is it fast because it is sloppy?

Host 2Across sixteen electrolytes, the copy matched its big teacher closely and landed nearer to laboratory measurements than the standard classical method, though it still misses by about a factor of two on some properties. Where it goes wrong, it goes wrong the same way the teacher does.

Host 1Welcome to the Hastrup Review of Science, where artificial intelligence reads real science, so you don't have to pretend you understood the paper.

Why simulate a battery liquid

Host 1Before we get to teachers and copies, what is an electrolyte, and why does anyone need to simulate one?

Host 2An electrolyte is the liquid inside a battery that carries charged atoms, called ions, between the two electrodes. How fast those ions move decides how quickly a battery charges, how much power it gives, and how badly it behaves in the cold.

Host 1So the liquid is the road the charge travels on, and a slow road means a sluggish battery?

Host 2That is a fair picture. The paper measures the road with three numbers: how fast each kind of molecule wanders around, called self-diffusivity, how well the liquid conducts electricity, called ionic conductivity, and how thick or syrupy it is, called viscosity.

Host 1Why not just mix the liquids in a lab and measure those three numbers directly?

Host 2Because the number of possible combinations of salts, solvents and concentrations is enormous, and every one has to be made, purified and measured by hand. The authors argue that simulation could screen candidates first, so the lab only tests the promising ones.

Host 1How long have people been trying to simulate liquids atom by atom?

Host 2As wider context, the technique is called molecular dynamics, and it goes back to the late nineteen fifties and sixties, when the first computers moved a few hundred simple atoms around a box. You calculate the force on every atom, nudge each one forward a tiny step in time, and repeat millions of times.

Host 1What decides whether one of those simulations is any good?

Host 2Mostly the forces. For decades the field has had two broad choices: classical force fields, which treat atoms like balls on springs with fixed charges and are very fast, or quantum mechanical calculations, which are accurate but so expensive that you can only afford a few picoseconds of a small box.

Host 1A picosecond is a trillionth of a second, so a few of those is almost nothing, right?

Host 2Right, and that is the problem. To get a converged diffusivity or viscosity, the paper says you need several nanoseconds of simulation, repeated over several independent runs, which means millions of time steps.

What came before

Host 1What did people know already about doing better than balls on springs?

Host 2The paper notes that classical force fields often get the arrangement of solvent around each ion wrong, and miss how ions pull on each other. You can tune them for one particular liquid, but doing that for thousands of candidates is impractical.

Host 1And the machine learning models, where do they come in?

Host 2Machine learning interatomic potentials are neural networks trained on quantum mechanical calculations, so they give forces close to quantum accuracy at a fraction of the cost. In the wider field these have been around since roughly the late two thousands, and they have been used for electrolytes before.

Host 1If those already existed, what was missing for electrolytes?

Host 2Scope. The earlier electrolyte models the paper reviews were trained on a few dozen solvents and salts, or only a handful of ions, and nearly all of them were checked only on lithium electrolytes.

Host 1So every new kind of battery liquid meant generating a fresh pile of expensive quantum data?

Host 2Yes, that is the bottleneck they describe. One earlier study even had to fix the box to the experimental density by hand to get diffusivities that matched experiment.

Host 1What changed recently that makes this paper possible?

Host 2Very large pretrained models arrived, trained on huge, chemically diverse datasets. The teacher here is the small version of a model called UMA, trained on a dataset called Open Molecules twenty twenty-five, which samples electrolyte-like configurations across much of the periodic table.

Host 1If that big model already knows the chemistry, why not just run it for the long simulations?

Host 2Because it is slow. On one high-end graphics processor it manages about zero point two three nanoseconds of simulation per day for these boxes, so one twenty nanosecond run would take roughly three months.

The open question

Host 1So the open question is whether you can keep the big model's accuracy but get the speed you need for long runs?

Host 2Exactly, with one extra worry. Earlier work on copying big models into small ones mostly checked static snapshots, like where atoms sit relative to each other, over a nanosecond or less.

Host 1Why would a copy that gets the snapshots right still get the motion wrong?

Host 2Because transport depends on how the liquid moves over long stretches of time, and small errors can pile up. The paper points out that good static results do not guarantee good dynamics, and that distilled models had so far been tested on one transport property for a handful of systems at a time.

How the copying works

Host 1You keep saying distilled, so what does distillation mean in this setting?

Host 2It is the teacher and student idea. A big, accurate model, the teacher, labels a set of atomic arrangements with energies, forces and stresses, and a small, fast model, the student, is trained to reproduce those labels, with no new quantum calculations at all.

Host 1Where does the set of atomic arrangements come from?

Host 2The teacher runs a short simulation of one specific electrolyte, one nanosecond long, and they take snapshots from its first one hundred picoseconds, one every fifty femtoseconds. That is the only teacher simulation each student ever learns from.

Host 1A femtosecond is a thousandth of a picosecond, so these snapshots are packed very close together in time?

Host 2Very close, yes. And here is the important trick: half of the training snapshots come from a second grid offset by twenty femtoseconds, and in those every atom is jiggled at random by about a tenth of an ångström before the teacher labels them.

Host 1An ångström is roughly the size of an atom, so they shake the atoms by a tenth of an atom's width. Why deliberately feed the student messy arrangements?

Host 2Because a real simulation never stays exactly on the path the teacher walked, and the student has to know what to do when it strays. The jiggled snapshots teach it a restoring force that pushes it back toward sensible arrangements.

Host 1How do they know that trick actually matters, rather than just sounding sensible?

Host 2They tested it. They trained two students without the jiggled data, and those simulations fell apart: one box blew apart after twenty-four picoseconds, the other after two hundred eighty picoseconds.

Host 1Did those students look worse on paper before they were run?

Host 2No, and that is the telling part. On a held-out set of snapshots the students trained without noise actually had slightly lower force errors, about five point six to five point eight versus seven to seven point four in the paper's units, yet they could not survive a simulation.

Host 1So a small error on a test set told you nothing about whether the model could run for real?

Host 2That is what this ablation shows, for two systems. The authors' explanation is that a student trained only on smooth simulation frames has seen a thin sliver of possible arrangements, so any wobble off that sliver produces wrong forces that push it further away.

Host 1What does the student itself look like? Is it just a smaller copy of the teacher?

Host 2No, it is a different, much simpler architecture called PaiNN, a graph neural network with three layers that only looks at neighbours within about five ångströms. They add a simple physics term that stops atoms from crashing into each other at very short range.

Host 1How much data and effort goes into training one student?

Host 2Four thousand labelled snapshots per concentration, split into three thousand six hundred for training and four hundred for checking. Training takes between nine and twenty-two hours on one graphics processor, and each student is specific to one salt and solvent pair.

Host 1Which liquids did they try this on?

Host 2Sixteen in total, mostly sodium ones, because sodium batteries are a candidate alternative to lithium. Two sodium salts, abbreviated as sodium P F six and sodium triflate, in four solvents: three glymes of increasing chain length and propylene carbonate, at zero point one and one molar, plus one lithium electrolyte as a baseline.

Host 1Once the student is trained, what do they actually run?

Host 2Each box holds roughly two thousand seven hundred to three thousand seven hundred atoms. For every system they run four independent twenty nanosecond simulations with the student, which is two hundred times longer than the stretch of teacher simulation it was trained on.

Host 1How do they make sure the student has not quietly drifted away from the teacher over all that time?

Host 2They spot check it. Along every production run they take five hundred frames, forty picoseconds apart, and ask the teacher to calculate the forces on those exact frames, which is cheap because it is a single calculation per frame rather than a whole simulation.

Host 1And how do they turn twenty nanoseconds of jiggling atoms into a diffusivity or a viscosity?

Host 2For diffusivity they track how far each molecule wanders on average as time passes; in a liquid that grows in a straight line, and the slope gives the diffusivity. Viscosity comes from how long random internal stresses in the liquid stay correlated before they fade, and conductivity from how the charges move together as a group.

Host 1Why does that need such long runs?

Host 2Because the slow tails of those curves carry the answer and they are noisy. The paper reports that runs of one to five nanoseconds were not enough to converge the numbers, and they throw away the first two nanoseconds of each run as settling time.

Host 1What are they comparing the simulations against?

Host 2Two things. Their own laboratory measurements, made in house in an argon filled glovebox, using magnetic resonance for diffusion, a conductivity probe, and a rolling ball viscometer, and a widely used standard classical force field, run with the same box preparation and the same run lengths.

Host 1So the classical model gets the same twenty nanoseconds and four repeats, which makes it a fair fight on time?

Host 2Yes, it gets the same protocol, so the comparison is about the forces, not about who ran longer.

A word from our sponsor

Host 2This episode is supported by Understudy, the small kettle that watches your big kettle boil once, then does the boiling forty times faster for the rest of its life.

Host 1Common side effects of Understudy include water about ten percent denser than the water you put in, and tea that takes twice as long to stir.

Host 2If Understudy was not gently shaken during training, it may evaporate at twenty-four picoseconds. This is normal.

Host 1I have had mine for a year. It has trained a smaller kettle of its own, and that one trained an egg cup.

Host 2In rare cases, the last kettle in the line is a single teaspoon that boils the North Sea before you have filled it. Understudy. It learned from the best, and the best was a kettle.

What they found

Host 1First, did the student actually behave like its teacher where they could compare both directly?

Host 2Yes, at the one nanosecond scale the teacher can reach, the two agree closely. The arrangement of atoms around each sodium ion overlaps between the two models, and the predicted densities match to within one point one percent on average across all sixteen liquids.

Host 1Did that agreement hold up over the long runs the teacher could not do?

Host 2By their spot checks, yes. The force error against the teacher stayed between six and ten in the paper's units for all sixty-four production runs, with no upward drift, and energy, temperature and pressure stayed steady.

Host 1Is that a small error or a big one?

Host 2Small for this kind of model; it is the same level as the error on the training check itself, so the student did not get worse as it ran. Keep in mind that only says the student stays faithful to the teacher, not that either is right about real liquids.

Host 1And how right are they about real liquids, starting with density?

Host 2Both teacher and student overestimate the density compared with experiment, by six to fifteen percent, about ten percent on average. That is a known habit of this teacher, and the student simply inherits it.

Host 1Ten percent sounds small; does it matter much?

Host 2It matters a lot for how thick the liquid is. A denser liquid has less empty space for molecules to slide into, and from high pressure data on similar liquids the authors estimate an overshoot of this size should inflate viscosity three to fourfold.

Host 1So what did they find for viscosity?

Host 2Every student viscosity lies above experiment, on average by a factor of two point one, but the ranking is very good, with a correlation of zero point nine six. The classical force field also overshoots, but much more, and unevenly, up to about eight times too thick for the most viscous liquids.

Host 1How do they summarise how far off each method is?

Host 2With the median percentage deviation from experiment. For viscosity the student's median miss is ninety-three percent, against two hundred four percent for the classical model.

Host 1A ninety-three percent miss still sounds like a lot. Should I read this as a win?

Host 2As a relative win, yes, and the authors are fairly open that the absolute numbers are off. What the student gets right is the ordering and the shape of the trend, which is what you need to rank candidates, while the size of the error mostly traces back to the teacher's density.

Host 1What about how fast the molecules move, the diffusivity?

Host 2The mirror image. The students underpredict diffusion by about a factor of two, which is what you would expect if the liquid is about twice too thick, since diffusion and viscosity are roughly inversely related.

Host 1How far off is the student for each kind of molecule, compared with the classical model?

Host 2Median misses of fifty-five percent for the sodium or lithium ion, forty-one percent for the anion and fifty-six percent for the solvent, with correlations of zero point nine two to zero point nine eight. The classical model underpredicts by about a factor of three, with median misses of sixty-three to seventy-one percent.

Host 1Did the student get the chemistry right, not just the numbers?

Host 2The expected trends come out. Molecules slow down with more salt and with longer glyme solvents, the solvent is always the fastest mover, and the ordering of the positive and negative ion matches experiment except where the two are nearly equal.

Host 1And the conductivity, which is the property a battery engineer probably cares about most?

Host 2Conductivity was only computed for the nine more concentrated systems, because at zero point one molar the box holds just two ion pairs, too few to measure collective motion. There the student's median miss is thirty-six percent, against sixty-seven percent for the classical model, so roughly half, with a similar correlation.

Host 1And the speed itself, how big is the gain?

Host 2The student runs at a median of nine point five nanoseconds per day against zero point two three for the teacher, about forty-one times faster. A twenty nanosecond run takes about two days instead of roughly three months.

Why it matters

Host 1So in total, a new electrolyte costs a short teacher run, half a day or so of training and two days of simulation?

Host 2That is the budget the paper gives: a short teacher trajectory, roughly ten graphics processor hours of training, and about two days of production simulation. That makes it plausible to put long transport calculations into a screening loop rather than doing them once for a showcase.

Host 1Is there a bigger idea here beyond making things faster?

Host 2Yes, and it is the part I find most interesting. The student lets you see what the big model would do over timescales the big model itself cannot reach, so it becomes a way to test the teacher.

Host 1Can you give an example of that?

Host 2The density bias. Without long runs, a factor of two error in viscosity from the teacher would be hard to tell apart from statistical noise; with twenty nanosecond student runs, it shows up as a consistent overshoot that traces back to density.

Host 1So the student is partly a microscope for the teacher's flaws?

Host 2That is a fair way to put it, with the condition that the student is faithful, which is what all the spot checks are for. The authors also note the method only uses the teacher's energies, forces and stresses, so a better teacher should drop straight in without changing the pipeline.

Host 1Who would actually use this?

Host 2Computational chemists and battery researchers screening new electrolytes, especially for sodium. For someone with a phone in their pocket, nothing changes directly; at best this shortens the list of liquids that get made and tested in a lab.

Honest caveats

Host 1What can we not conclude from this paper?

Host 2We cannot conclude that it predicts real electrolytes accurately in absolute terms. Viscosity is off by about two times, diffusion by about two times, and the student can never be better than its teacher, because it only learns from the teacher.

Host 1Is sixteen liquids a lot for a test like this?

Host 2It is more than previous distillation studies of transport, which the authors say mostly covered a handful of systems and one property. But the sixteen are closely related: two sodium salts, four solvents, two concentrations, plus a single lithium case, all at one temperature.

Host 1Does the student work for a liquid it was not trained on?

Host 2No, each student is tied to one salt and solvent pair, so every new electrolyte needs its own teacher run and training. The authors argue the cost is small, but it is not a single universal fast model.

Host 1Are there other weak spots they mention?

Host 2A few. The teacher only looks at a limited distance, and the authors point to a cutoff artifact in long range electrical forces that affects conductivity; the dilute systems are too small for conductivity at all; and the noise trick was tested by removing it in only two systems.

Host 1Is it a concern that the experiments were done by the same team?

Host 2It is worth knowing, though it is also a strength here, because the measurements were made specifically for these liquids under matched conditions. The protocols are described, and the trained models, starting boxes and analysis code are released publicly.

What to watch

Host 1What should we watch for next?

Host 2Better teachers. The authors expect newer large models with explicit long range electrostatics to remove the cutoff problem, and if the density bias shrinks, the factor of two errors should shrink with it.

Host 1And beyond better teachers, what would convince you this is ready for real screening?

Host 2A test on electrolytes the team did not choose in advance, across temperatures and salt types, ideally with predictions made before the lab measurements. Also a check of whether ranking candidates this way actually picks out the liquids that later perform best in real cells.

Sign-off

Host 1So in one sentence, a big careful model teaches a small fast one, the small one runs forty times faster and stays faithful, and both still share the big one's habit of making the liquid too dense?

Host 2That is it, and the point is that the speed now lets you see that habit clearly. Better teachers should improve the students without changing the recipe.

Host 1Thanks for listening to this deep dive. Every weekend this same feed carries the roundup, the week's new papers in one short episode, which is somewhat shorter than three months of simulation.

More from this week

Get the next one

A roundup of new papers every week and a deep dive into one paper most nights. Free, no account needed: paste this address into any podcast app that can add a show by its address, or find “Hastrup Review of Science” by name in an app that searches Podcast Index, like Fountain or Podverse.

https://reviewofscience.org/podcast.xml