The universe is filled with beautiful objects, like this bubble nebula, located more than 8,000 light-years from Earth. Researchers recently used artificial intelligence to simulate the universe. Though the simulation did surprisingly well, no one fully understands how it works.

The first-ever artificial intelligence simulation of the universe seems to work like the real thing — and is almost as mysterious.

Researchers reported the new simulation June 24 in the journal Proceedings of the National Academy of Sciences. The goal was to create a virtual version of the cosmos in order to simulate different conditions for the universe's beginning, but the scientists also hope to study their own simulation to understand why it works so well.

"It's like teaching image-recognition software with lots of pictures of cats and dogs, but then it's able to recognize elephants," study co-author Shirley Ho, a theoretical astrophysicist at the Center for Computational Astrophysics in New York City, said in a statement. "Nobody knows how it does this, and it's a great mystery to be solved." [Far-Out Discoveries About the Universe's Beginnings]

Simulating the universe

Given the enormous age and scale of the universe, understanding its formation is a daunting challenge. One tool in the astrophysicist toolbox is computer modeling. Traditional models require a lot of computing power and time, though, because astrophysicists might need to run thousands of simulations, tweaking different parameters, to determine which is the most likely real-world scenario.

Ho and her colleagues created a deep neural network to speed up the process. Dubbed the Deep Density Displacement Model, or D^3M, this neural network is designed to recognize common features in data and "learn" over time how to manipulate that data. In the case of D^3M, the researchers inputted 8,000 simulations from a high-accuracy traditional computer model of the universe. After D^3M had learned how those simulations worked, the researchers put in a brand-new, never-before-seen simulation of a virtual, cube-shaped universe 600 million light-years across. (The real observable universe is about 93 billion light-years across.)

The neural network was able to run simulations in this new universe just as it had in the 8,000-simulation dataset it had used for training. The simulations focused on the role of gravity in the universe's formation. What was surprising, Ho said, was that when the researchers varied brand-new parameters, like the amount of dark matter in the virtual universe, D^3M was still able to handle the simulations — despite never being trained on how to handle dark matter variations.

Computers and cosmology

This feature of D^3M is a mystery, Ho said, and makes the simulation intriguing for computational science as well as cosmology.

"We can be an interesting playground for a machine learner to use to see why this model extrapolates so well, why it extrapolates to elephants instead of just recognizing cats and dogs," she said. "It's a two-way street between science and deep learning."

The model might also be a time-saver for researchers interested in universal origins. The new neural network could complete simulations in 30 milliseconds, compared to several minutes for the fastest non-artificial intelligence simulation method. The network also had an error rate of 2.8%, compared with 9.3% for the existing fastest model. (These error rates are compared to a gold standard of accuracy, a model that takes hundreds of hours for each simulation.)

The researchers now plan to vary other parameters in the new neural network, examining how factors like hydrodynamics, or the movement of fluids and gases, may have shaped the universe's formation.

Originally published on Live Science.