At night at sea, a distant lighthouse blinks with a steady rhythm. The brighter the flash, the closer the shore. Astronomers use RR Lyrae stars in much the same way: these stars pulsate, their brightness varies with periods from a few hours to a day, and from the apparent brightness one can calculate the distance. But there's a catch: to know the true brightness of such a star, you previously had to know how many heavy elements it contains. It's like determining the power of a lighthouse lamp without knowing what kind of glass it's made of.
Scientists trained a neural network to look at the light curve, a graph of how a star's brightness changes over time. The network works like a musician who guesses the loudness of an instrument from its rhythm and timbre without seeing it. For training, they took about 80,000 such graphs from the Gaia catalog. The neural network received no data on chemical composition; it found the patterns between the shape of the pulsations and the true brightness on its own. As a result, the distance accuracy for globular clusters reached 1%, which is 1.8 times better than previous methods. Now it's possible to quickly measure distances to many stars and build an accurate map of our Galaxy, as well as test how fast the Universe is expanding.
RR Lyrae stars pulsate with periods from 0.2 to 1.2 days, and their brightness varies by 0.2–2 magnitudes. In globular clusters they are so numerous that they are called "beacons of metal-poor old systems."
In Isaac Asimov's novel The Gods Themselves, an alien civilization uses pulsating energy sources for interstellar communication. Our RR Lyrae stars are natural pulsars in the optical range, and their rhythm really could be turned into a distance code.