NNStar: an AI “skill” that builds and tests neutron‑star models from a Lagrangian to observables
The paper introduces NNStar, an end‑to‑end artificial‑intelligence agent that automates the whole chain of building and testing models of dense nuclear matter and neutron stars. Instead of asking researchers to hand‑tune many free parameters, NNStar can read a mathematical description of a model (a Lagrangian), turn it into equations, solve them, make a physical equation of state, predict neutron‑star masses and radii, and then judge how well those predictions match nuclear and astrophysical data.
NNStar is packaged as a portable “skill” that a large language model (LLM) agent can load. The skill pairs the LLM’s planning and natural‑language abilities with a set of deterministic physics tools. These tools symbolically derive the mean‑field equations of motion from the Lagrangian, numerically solve those equations and evaluate nuclear saturation properties, build the beta‑equilibrium equation of state and attach a crust model, integrate the Tolman–Oppenheimer–Volkoff equations to get mass–radius curves, and finally score the model with a Bayesian joint analysis against nuclear and astrophysical observations. In short, the agent plans and the skill executes the physics pipeline.
To demonstrate the idea the authors use a general quantum hadrodynamics model (GQHD) as their example backbone. This model includes a set of mesons and nucleons and, with fixed particle masses, gives a 21‑dimensional space of coupling parameters that must be tuned. The approach works within the relativistic mean‑field (RMF) approximation, which treats fields by their average values. The pion is not included because it vanishes in this approximation. The skill is model‑agnostic in design: it operates on one self‑consistent Lagrangian at a time, so other effective models can be swapped in without rewriting the agent.
This automation matters because constraining the dense‑matter equation of state requires combining very different data sets. Those include properties near nuclear saturation density from lab experiments and global neutron‑star measurements such as masses, radii, and tidal deformabilities. Exploring and fine‑tuning a high‑dimensional parameter space by hand is slow and error prone. NNStar aims to speed that up and make the workflow reproducible and auditable by replacing ad hoc scripts with a documented, tool‑based skill. The paper reports that the authors validated the skill by reproducing known Walecka‑type models, showed it can be extended (for example by adding a new scalar self‑interaction), and ran benchmarks of different LLMs driving the same skill.