AWS Public Sector Blog
Mysteries of the universe: Training neural networks to estimate parameters of synthetic black hole images
Before the Event Horizon Telescope project released the first-ever picture of a black hole in 2019, nobody had ever seen one. Black holes are a region of space with a gravitational pull so strong that nothing—not even light—can escape them. A prediction from Einstein’s theory of general relativity, black holes hadn’t been observed directly because a telescope large enough to see them didn’t exist until scientists hooked up the radio telescope around the globe. The cloud is helping accelerate research into black holes.
Studying black holes
Visualizing black holes would allow researchers to better understand this mysterious component of the universe. They could test theories, like Albert Einstein’s general relativity, to see if they hold true and study how black holes alter the universe as they consume matter.
In April 2017, more than 200 scientists collaborated to use ground-based radio telescopes all around the world to observe and collect data on a black hole in the Messier 87 (M87) galaxy. M87, located more than 50 million light years away in the Virgo cluster, was chosen for being one of the nearest and largest black holes. Collectively, the array of observatories served as an Earth-sized telescope that provided various perspectives of the black hole that were used to construct the image. The feat left astrophysicists wondering if it’d be possible to leverage machine learning (ML) to infer physical characteristics such as spin or magnetic flux from the image.
ML advances black hole research
Joshua Yao-Yu Lin, a physics PhD student at the University of Illinois at Urbana-Champaign, member of the Event Horizon Telescope Collaboration, and AWS Cloud Credit for Research grant recipient, studies how neural networks can estimate parameters of synthetic black hole images.
Neural networks are a computing system that use algorithms to perform operations similar to how neurons function in the human brain. A common application is image recognition. Lin uses this type of ML because black hole features are difficult to detect by human observation. The question was, could neural networks be trained to recognize different black holes to help scientists understand qualities of these elusive objects in space?
In response, Lin and his team trained a neural network on 100,000 high resolution synthetic black hole images generated through fluid simulations to predict features including the spin and mass of a black hole, the inclination angle, and accretion rate (how quickly matter falls into black holes). The project was executed through the ResNet-18 model, which is a neural network that’s 18 layers deep. The more layers there are in a neural network, the better they perform as each layer scans the images to identify specific properties.
Machine learns new features of black holes
After feeding synthetic black hole images to both an untrained ResNet-18 and a trained ResNet-18 model, Lin and his team found that while both network types produced feature maps that illustrated a ring-like design, the trained network identified outward spiral features. By comparing the trained neural networks with untrained neural networks, the team could learn what new features are unique in the synthetic black hole images. The findings suggest that the trained network developed sensitivity to black hole patterns and can recognize distinct features. Through processing the images, the trained neural network was able to infer black hole spin and magnetic flux values, which suggests there’s potential to distinguish black holes. Lin used a technique called feature map visualization to look at the intermediate layers of output to understand why the neural networks were effective. There’s still a lot to discover about how the universe works, and astrophysicists rely on technology like ML to help make scientific progress in this field.
“Without receiving AWS Cloud Credit for Research, I wouldn’t have been able to do the research,” said Lin. Lin used Amazon Simple Storage Service (Amazon S3) to store the synthetic black hole images dataset and Amazon Elastic Compute Cloud (Amazon EC2) graphics processing unit (GPU) instance to perform the trainings. Each training took up to two days, and AWS Promotional Credit provided access to the GPUs required for the research. “The key thing about ML and neural networks is that you need a huge dataset in order to do the training. Amazon EC2 provided uninterrupted GPU Instances that are helpful compared to most of the HPC services, and the GPUs are really good, so training is efficient.”
Looking forward, Lin states that the neural network outputs can inform what features to look for to better understand black holes. In addition, he believes ML and neural networks can play a critical role in other scientific domains. “If we can really look into what else artificial neurons are doing, we can do interesting things like looking at X-ray scans to help identify if there’s a disease present.”
Continue to explore feature extraction on synthetic black hole images in this paper, and learn more about the AWS Cloud Credit for Research program.