A new artificial intelligence tool may soon help astronomers learn more from some of the most extreme collisions in the Universe — those between neutron stars — by identifying them within seconds and guiding telescopes to the right part of the sky in time to catch the light they emit.
In a study published in Nature, a research team unveiled a machine learning algorithm that can rapidly and accurately pinpoint the location of a neutron star merger using gravitational wave signals alone. The tool also estimates important physical properties of the stars, such as their mass and rotation speed, which are crucial for understanding the makeup of these enigmatic objects.
“Rapid and accurate analysis of the gravitational-wave data is crucial to localize the source and point telescopes in the right direction as quickly as possible to observe all the accompanying signals,” Maximilian Dax, a doctoral researcher at the Max Planck Institute for Intelligent Systems and ETH Zurich and lead author of the study, said in a press release.
Neutron stars as natural laboratories
Neutron stars are incredibly compact remnants of massive stars that have exploded in supernovae. Though only about 20 kilometers in diameter, they pack more mass than the Sun, crushing matter to densities unmatched anywhere else in the cosmos. Inside these ultra-dense objects, electrons are squeezed into protons, turning them into neutrons — hence the name of these celestial bodies.
Physicists are especially interested in these stars because their internal matter closely resembles that of atomic nuclei, but under far more extreme conditions that include enormous gravity. Studying neutron stars, then, is like probing the inner workings of atomic nuclei on a cosmic scale.
Yet the extreme densities inside these stars make them notoriously difficult to study directly. Quantum chromodynamics — the theory governing the strong force that binds particles in the atomic nucleus — is incredibly complex, especially at low particle velocities, where it can’t be solved with traditional mathematical techniques.
This is why mergers between neutron stars are so important. When two of these dense objects spiral into one another and collide, they release a torrent of gravitational waves — ripples in space-time that can be picked up by detectors like LIGO, Virgo, and KAGRA. The collision also generates a kilonova, an immense explosion that for a brief time outshines entire galaxies. This explosion produces light as radioactive elements form and decay — an essential electromagnetic signal that offers a different view of the event.
“Such early multi-messenger observations could provide new insights into the merger process and the subsequent kilonova, which are still mysterious,” says Alessandra Buonanno, Director of the Astrophysical and Cosmological Relativity Department at the Max Planck Institute for Gravitational Physics and one of the authors of the study.
A race against time
The challenge is speed. Gravitational wave detectors can confirm that a merger has occurred, but traditional algorithms used to analyze those signals can take hours to produce reliable estimates of the source’s location. By that time, the brightest phase of the kilonova — lasting only seconds to minutes — has already passed, and astronomers miss out on key observational data.
To solve this problem, the research team turned to machine learning. They trained a neural network on a large dataset of simulated gravitational wave signals produced by colliding neutron stars. This allowed their system to “learn” how different signal shapes correspond to different sky locations and physical parameters.
The result is a massive improvement in speed. Their algorithm can now determine the likely sky position of a neutron star merger in around one second—nearly a thousand times faster than previous methods—without sacrificing accuracy.
In their paper, the team developed a machine learning algorithm that was trained on simulated data of the merger’s gravitational wave emissions that allowed the team to identify the merger location around three orders of magnitude faster than the currently available algorithms and reducing the identification time to around 1 second.
“Current rapid analysis algorithms used by [gravitational wave detectors such as LIGO, Virgo, and KAGRA] make approximations that sacrifice accuracy. Our new study addresses these shortcomings,” says Jonathan Gair, a group leader in the Astrophysical and Cosmological Relativity Department at the Max Planck Institute for Gravitational Physics in the Potsdam Science Park, and one of the authors of the study.
What makes such short timing especially important is that it allows scientists to predict a neutron star merger before it actually happens. This is possible because neutron stars begin emitting gravitational waves during their slow spiral toward each other, enabling detectors to catch the signal in advance and redirect telescopes in time.
“Our study showcases the effectiveness of combining modern machine learning methods with physical domain knowledge,” adds Bernhard Schölkopf, Director of the Empirical Inference Department at the Max Planck Institute for Intelligent Systems and at the ELLIS Institute Tübingen.
The team tested their algorithm on previously detected neutron star mergers and found excellent agreement between their predictions and the actual observations. The system was also able to recover critical properties like the stars’ masses and spin rates — data that are essential for drawing conclusions about the inner structure of neutron stars.
Looking ahead
The researchers plan to extend their algorithm to detect other types of collisions, such as those between neutron stars and black holes. These events could offer even more information about the behavior of matter under extreme gravity.
They also aim to make their models more robust by accounting for the background noise that is always present in real gravitational wave detectors. Including such noise in training simulations should help the system perform even better when applied to live data.
If these improvements prove successful, this machine learning tool could become a vital part of the search for gravitational waves — helping astronomers catch cosmic collisions in the act and unravel the mysteries of the densest objects in the universe.
Reference: Maximilian Dax et al, Real-time inference for binary neutron star mergers using machine learning, Nature (2025). DOI: s41586-025-08593-z
Feature image credit: WikiImages on Pixabay