14 seconds. That’s all it takes for a new code to weave the full spectrum of a star, from ultraviolet to near-infrared. This spectrum is not just a rainbow but a detailed tapestry of thousands of dark absorption lines, each left by a specific atom in the star's atmosphere. Astronomers work with these tapestries like weavers: each line is a thread, and the full spectrum is the finished cloth, holding information about the star’s temperature, chemical composition, and motion.
For decades, calculating a single such tapestry took tens of minutes. In the era of large surveys collecting millions of spectra, that’s impossibly slow. Enter emulators — simplified models trained on precomputed examples — and grid interpolations. But like a copy of a copy, they inherit others’ errors and lose accuracy when accounting for the influence of many chemical elements. Direct physical calculation remained the gold standard, too expensive for mass use.
Payne Zero changes the game. The code, named after Cecilia Payne-Gaposchkin, rewrites the synthesis logic: instead of processing wavelengths sequentially, all wavelengths are handled simultaneously on the GPU. It’s like replacing a hand loom with a multi-shuttle Jacquard — threads are woven at once. Atmospheric iterations, where steps in pressure and temperature are needed, accelerate on multi-core CPUs by a factor of 6–7, and a trained initializer cuts the number of iterations in half again. Result: the infrared APOGEE region (1.5–1.7 µm) synthesizes in 1.4 seconds.
With this speed, stellar analysis can, for the first time, embed direct physical fitting into the pipeline for millions of objects. In a demonstration on 1600 real stars from the APOGEE survey, Payne Zero simultaneously determined 12 elements (carbon, nitrogen, oxygen, magnesium, aluminum, silicon, sulfur, calcium, titanium, manganese, nickel) and the [Fe/H] parameter. Chemical sequences clearly separated high- and low-α stars, consistent with the catalog. And all this with a self-consistent recalculation of the atmosphere at the end.
The final touch is the calibration of the threads. The method uses automatic differentiation of the entire radiative transfer chain to simultaneously fit over 100 000 corrections to atomic data using reference atlases of the Sun and Arcturus. Discrepancy with observations decreased by more than 80%. Now each atomic transition gets a calibrated "thread," and the spectral fabric lies flat, without distortions.
Direct optimal calculation inside the fitting loop eliminates the need for emulators altogether. Any elements can be introduced without rebuilding grids, and any mismatches with data can be checked at the level of atomic constants or atmospheric structure. Metallicity and individual abundances are now measured consistently, accounting for mutual influences through the equation of state. Thus, the unified tapestry of galactic history is woven: faster, more accurate, and with smaller systematic errors.
The project began as a hobby and made active use of large language models to translate code from Fortran to Python, but key decisions about data boundaries and parallelization remained with the human. Artificial intelligence translated the routine, but the architecture was guided by experience with the original programs.