Convolutional Neural Network in Astrophysics for identifying Gravitational Lenses

Rabindra Nath Nandi
CompositeAI
Published in
5 min readApr 10, 2018

A research group of Department of Physics and Astronomy, University of California Irvine developed a Deep Learning Framework LensFlow for identifying Strong Gravitational Lenses.

A gravitational lens is a distribution of matter (such as a cluster of galaxies) between a distant light source and an observer, that is capable of bending the light from the source as the light travels towards the observer. This effect is known as gravitational lensing, and the amount of bending is one of the predictions of Albert Einstein’s general theory of relativity

Normal lenses like a magnifying glass work by bending light rays that pass through them in a process known as refraction, in order to focus the light somewhere.

Gravitational lensing works in an analogous way and is an effect of Einstein’s theory of general relativity — simply put, mass bends light. The gravitational field of a massive object will extend far into space, and cause light rays passing close to that object (and thus through its gravitational field) to be bent and refocused somewhere else. The more massive the object, the stronger its gravitational field and hence the greater the bending of light rays just like using denser materials to make optical lenses results in a greater amount of refraction. A nice introduction is found there https://www.youtube.com/watch?v=yamVbK-J69M

The total mass energy of the universe is divided into three parts Normal Matter(4%), Dark Matter(21%) and Dark Energy(75%). All the stuff of the universe that made of galaxies, planets, stars, nebulae, dust, rocks and gas makes up only 4% of the total mass-energy content of the universe. Dark Matter and Dark Energy are not visible , cosmologists try to understand their existance by their effects on the regular matter of the univese.

Image: physicsforme.wordpress.com

When astronomers take a telescope image of a part of the night sky, we can see many galaxies on that image. However, in between the Earth and those galaxies is a mysterious entity called dark matter. Dark matter is invisible, but it does have mass, making up around 85% of the mass of the Universe. This means that light rays coming towards us from distant galaxies will pass through the gravitational field of dark matter and hence will be bent by the lensing effect.

Image: NASA

Gravitational lensing is useful to cosmologists because it is directly sensitive to the amount and distribution of dark matter. This is because the amount of light bending is sensitive only to the strength of the gravitational field it passes through, which is mostly generated by the mass of the dark matter in the Universe.

This means that to measure the amount of lensing on a patch of sky, we don’t need to know anything about what kind of galaxies we are observing, how they form and behave or what colour light they emit. This makes gravitational lensing a very clean and reliable cosmological probe as it relies on few assumptions or approximations.

Convolutional Neural Network and Gravitational Lensing

Deep Learning models like Convoutional Neural Network(CNN) is architecturally simple . But for finding a better model with problem specific images is really challengeing.

The Gravitational Lensing dataset is collected from HST/ACS i-band observations in the full COSMOS field to search for candidate gravitationally lensed sources. The data is available in Space Telescope Science Institute website http://www.stsci.edu/~koekemoe/cosmos/.

To augment the dataset for per class , a Lens Simulation tool, LENSTOOL is used to generate image plane models of lensing systems using realistic models of randomly selected elliptical galaxies within the COSMOS field as deflectors and coadded these to the selected elliptical galaxies to generate the training set.

One of major challenges is to prepare processed dataset for CNN Architecture. Galaxy are more complex than normal images. In order to prepare the survey data for the neural network, They created 200 × 200 pixel cutouts around sources identified by SEXTRACTOR, which corresponds to roughly 3 × 3 square arcseconds. SEXTRACTOR is a program that builds a catalogue of objects from an astronomical image. It is available in here https://www.astromatic.net/software/sextractor.

They ignored sources that extended less than 200 pixels total (not to be confused with our cutout size) and were not 1.5σ brighter than the background, totaling 236,000 images. These images were then downsampled to 100 × 100 pixels to speed up the training and scanning process.

At the normalization phase they use gamma correction to adjust the image contrast.

At the training phase , they use single color channel images to capture the geometry rather than the color contrast. So the input to the convnet is (1*100*100) dimension. They use softmax layer at the decision layer. To optimize ConvNet they used a cross-entropy function as the loss function, and minimize the loss using Adam Optimizer. The dataflow is given in the following figure.

Architecture of the datafow through the ConvNet layers

The tabular representation of the architecture gives a better relaization of the system.

Tabulated Architecture of LensFlow

Three classification phases Coarse Classification Phase (Phase 1),Fine Classification Phase (Phase 2) and Search Phase (Phase 3) are used in this work.

Identified COSMSOS lens candidates by LENSFLOW.
Grade A corresponds to images that are clearly a strong gravitational lens. Grade B lenses correspond to images that are most could also be artifacts, noise, structures in elliptical galaxies, satellite alaxies, tidally interacting galaxies, etc. Grade C lenses consist of images that are most likely not a lens, but there is a chance they might be gravitationally lensed

The github link of the project is available in https://github.com/Miladiouss/LensFlow

The article is written using the information from the original paper http://iopscience.iop.org/article/10.3847/1538-4357/aaae6a, wiki page https://en.wikipedia.org/wiki/Gravitational_lens and the blog article http://www.cfhtlens.org/public/what-gravitational-lensing

--

--