When two neutron stars spiral into each other and collide, they briefly recreate conditions not seen since the first moments of the universe: matter so dense and neutron-rich that atomic nuclei can gorge on free neutrons and build their way up the periodic table. This is the cosmic forge for much of the gold in wedding rings, the platinum in catalytic converters, and the rare-earth elements in nearly every smartphone. The trouble is that simulating it has long strained even the world's largest supercomputers. Now an international team says it has taught an artificial neural network to shoulder the hardest part of that calculation, cutting the cost dramatically and opening the door to far more detailed models of how the heaviest elements are born.
The work, led by researchers at GSI/FAIR in Germany and published in the journal Physical Review D, introduces a machine-learning tool the team calls RHINE. The result was reported publicly around July 8, 2026. Its promise is not a new theory of element formation but a new way to compute the old one fast enough to actually explore it.
The bottleneck in the cosmic forge
Many of the elements heavier than iron are made through rapid neutron capture, known to nuclear astrophysicists as the r-process. In the extreme environment of a neutron star merger, atomic nuclei absorb free neutrons faster than they can radioactively decay. Some of those captured neutrons later convert into protons, ratcheting the nuclei up to heavier and heavier elements until the neutron supply runs out. When the dust settles, the freshly minted radioactive nuclei decay and release energy, and that heat helps power the luminous afterglow astronomers call a kilonova.
That heating is not a footnote. It shapes how fast the debris is flung outward, how the material spreads, and how bright the kilonova ultimately shines. To capture it properly, a simulation has to track thousands of nuclear species and their reactions simultaneously, all while the surrounding gas churns and expands under its own hydrodynamics. Doing the full nuclear-reaction network at every point and every timestep is so expensive that, in practice, researchers usually cannot afford it.
"Researchers around the world strive to make these complex reactions understandable through theoretical simulations. However, modeling all parameters requires incredible computing power, which is why the models often have to be simplified," said Dr. Oliver Just, the study's first author and a researcher in the Nuclear Astrophysics & Structure department at GSI/FAIR. "Our new model RHINE, which uses artificial intelligence, offers an efficient alternative."
Teaching a neural network to feel the heat
RHINE, short for r-process heating implementation in hydrodynamic simulations with neural networks, is a surrogate model. Rather than solving the full nuclear physics from scratch inside every running simulation, the team first ran a large library of reference calculations using complete nuclear-reaction networks. A deep-learning neural network was then trained on that library until it could predict how much energy the r-process releases under a given set of conditions. Once trained, the network stands in for the expensive calculation, estimating heating rates on the fly for a tiny fraction of the computational cost.
"First the ML models are trained using a large number of reference calculations produced with a full set of nuclear reactions. Subsequently, the models are adopted in running hydrodynamical simulations to approximate the heating rates during the r-process with minimal effort," explained Dr. Zewei Xiong, a scientist at GSI/FAIR and a key developer of the machine-learning models.
Crucially, the team did not simply trust the emulator. "With detailed comparisons, we validated our ML scheme against reference data," Xiong said. "The high degree of agreement suggests that the use of ML models can save a tremendous amount of computing time. We also deduced from the results that r-process heating is an important effect that should be better accounted for in future modeling." In their tests, including that heating made the resulting kilonova significantly brighter, by roughly a factor of two, an effect large enough that leaving it out would skew interpretations of real observations.
Why speed changes the science
The August 2017 detection of gravitational waves from a neutron star merger, followed by a kilonova seen across the electromagnetic spectrum, was the moment this field became an observational science rather than a purely theoretical one. Ever since, the gap has been between what telescopes and detectors can record and what simulations can predict quickly enough to compare against. A model that takes months of supercomputer time cannot easily be run hundreds of times to test the range of merger scenarios a single observation might represent.
That is where surrogate models earn their keep. By replacing a crippling calculation with a fast, trained approximation, RHINE lets researchers sweep across many more parameters and scenarios than brute-force methods allow. The team notes the approach could eventually connect measurements from the upcoming FAIR accelerator facility, where physicists study exotic nuclei on Earth, with astronomers' observations of stellar explosions in the sky.
RHINE fits a broader pattern reshaping computational science. Across weather forecasting, molecular chemistry, and fluid dynamics, machine-learning emulators trained on expensive simulations are increasingly used as fast stand-ins, trading a heavy up-front training cost for cheap predictions afterward. The persistent worry is reliability: a surrogate is only as trustworthy as its validation against ground truth, and only within the range of conditions it was trained on. The GSI/FAIR group's emphasis on benchmarking against full nuclear networks is a direct answer to that concern, and a signal of how these tools earn scientific credibility.
In keeping with that spirit, the team has released the RHINE source code publicly so other groups can build on it. The next kilonova to light up the sky may be interpreted, in part, by a neural network that learned the physics of the cosmic forge one reference calculation at a time.
"With detailed comparisons, we validated our ML scheme against reference data. The high degree of agreement suggests that the use of ML models can save a tremendous amount of computing time."-- Zewei Xiong, Scientist, Nuclear Astrophysics, GSI/FAIR