Skip to main content

Latent ATTEntive Neural Processes for Quasar Light Curves with parametric recovery

Project description

QNPy_Latte

Latent ATTEntive Neural Processes for Quasar Light Curves with parametric recovery

By Aman Nadimpalli Raju, Andjelka Kovacevic, Marina Pavlovic, Dragana Ilic, Iva Cvorovic-Hajdinjak (SER-SAG-S1 team)

QNPy_Latte_Logo

Introduction

Many of the secrets of quasars lie hidden within their variations. Analysis of quasar light curves can unlock some of these secrets, giving a holistic view of the region around the central black hole engine, as well as properties of the black hole. However, studying quasar variability itself is a challenge. The stochastic nature of the variations, coupled with the need for short cadence observations over a long period, make analysis difficult.

The LSST (Legacy Survey of Space and Time) will provide a plethora of quasar light curves, with short cadence observations throughout its 10 year run. However, there will be seasonal gaps in the observations, to keep up with the LSST goal of surveying the entire Chilean night sky. In order to utilize the LSST data for variational analysis, it is imperitive to model this data to fill in these gaps. To process the amount of data coming in, any such model should be non-parametric, computational inexpensive, data-driven, and capable of interpolation. We also would like to draw insights from the hidden layers of these models. Thus, we utilize Latent Attentive Neural Processes (AttnLNPs).

As part of the Serbian In-Kind software contribution to the LSST team (SER-SAG-S1), we present the QNPy Latte package to model and determine parameters (especially the transfer function) of quasar light curves. This work has been done by the guest student Aman N. Raju as part of his masters thesis and presented at the following:

Parts of this thesis have been presented as:

“A Deep Learning Approach for Understanding Quasar Light Curves in the Legacy Survey of Space and Time" - Symposium Mathematics and Applica- tion, Faculty of Mathematics, University of Belgrade, 2023

• “QNPy and QhX Workshop” - LSST AGN Science Collaboration Quarterly Report, March 2024

“Attentive Latent Neural Processes for modeling Quasar Variability in the LSST” - LSST TVS Colloquium, 21st May 2024

“Pay Attention: Neural Processes with Latent Spaces and Attention to model Quasar Light Curves for the LSST” - XIII SAW, Astronomical Society “Ruđer Bošković", 18th May 2024

“UPGRADING QNPY: MODELLING QUASAR LIGHT CURVES IN LARGE SURVEYS” - VI Conference on Active Galactic Nuclei and Gravitational Lensing, Zlatibor Mt., Serbia, June 02-06, 2024

• “Connecting the Dots: Attentive Latent Neural Processes” - 2nd MASS Summer School, Nice, France, July 2024 (First Prize 180s Thesis Talk)

“LSST SER-SAG-S1: upgrade of QNPy package” - Catching supermassive black holes with Rubin-LSST: Towards novel insights and discoveries into AGN science, Torino, Italy, July 22nd-25th 2024

Furthermore, this repository will be used in the paper, Raju et. al. 2024 (in prep).

Latent Attentive Neural Processes

At SER-SAG-S1, we have used Conditonal Neural Processes (CNPs) to model quasar light curves (see QNPy). However, CNPs suffer from issues with underfitting and produce poor samples. Thus, the addition of attentive mechanisms and a latent path allow for an upgraded model.

The AttnLNP has two paths. One path is the deterministic path that operates similarly to CNPs to create a representation of the light curve. The input data (observation time and magnitudes) are encoded using a multilayer perceptron (MLP) to create a representation for each point. With the addition of self-attention, the points that are more important are weighted more highly in the representation. Then, the representations are used with the input and target times to create a attention weighted representation for each target time, allowing for flexible representations that can adapt to different datapoints.

The latent path operates similarly. However, the representations are simply averaged to create a global representation. This representation is passed through another MLP to generate a multidimensional gaussian latent space that can be sampled from. The latent space samples are combined with the determinstic representation to generate a combined representation for each target point in the light curve. These combined representations are passed through an MLP decoder to generate a predicted magnitude at each target time.

Original implementation from (https://arxiv.org/abs/1901.05761)[Kim et al. 2019]

In our model, we also include the possibility to encode the input and target times with an LSTM RNN layer in order to better reconstruct the quasar light curves as detailed in (https://arxiv.org/abs/1910.09323)[Qin et. al. 2019]

Self Organizing Maps

Just like QNPy, we incorporate Self Organizing Maps (SOMs) (see into our models to cluster the light curves before modelling. This serves a two-fold purpose. The dataset can be partitioned for quicker modelling and the resulting clusters are more balanced topologically than unclustered light curves. SOMs are an unsupervised model that can be customized to generate many clusters and easily updated to include new data without having to retrain the entire model.

SOMs are composed of a grid of nodes that assign a best matching unit (BMU) to each of the input points (in this case, light curves). Then it updates the BMU to move closer to the datapoint at a rate specified by the learning rate and the neighborhood function that controls the updating of the nodes around the BMU. Thus, the entire SOM node is trained on the input data and every datapoint can have a BMU. These BMUs can be clusters themselves or they can be grouped together by density analysis to generate larger but fewer clusters.

Our SOMs are based on the minisom package and follow the same implementation as QNPy. Through the use of SOMs, AttnLNPs and RNNs, we hope to create a multimodal approach to analyzing light curves.

Prediction of Parameters

Similar to Park et. al. 2021, we use the hidden representation of the light curve to infer parameters. We specifically include the ability to reconstructe the transfer function of the quasar, informing us of the properties of the region around the central black hole engine. We do this through attaching an MLP to the model either during training, or on an already trained model and train the model on theoretical transfer functions.

Thus, we are able to not just perform reconstruction of the light curve itself, but also analyze key properties about the system driving the quasar in a purely data-driven manner.

Installation

It is recommended to use a virtual enviornment with Anaconda to install QNPy_Latte. Please install one in Python 3.9 as:

conda create --name my_env -c anaconda python=3.9

Activate this enviornment and then install QNPy_Latte by:

pip install QNPy_Latte

It is recommended to use a virtual enviornment.

Tutorial Notebooks and Scripts

The associated GitHub contains tutorial notebooks and scripts that utilize the QNPy_Latte package to conduct the clustering and modelling of light curves. Please visit Our GitHub for more.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qnpy_latte-0.1.0.post2.tar.gz (52.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

QNPy_Latte-0.1.0.post2-py3-none-any.whl (51.0 kB view details)

Uploaded Python 3

File details

Details for the file qnpy_latte-0.1.0.post2.tar.gz.

File metadata

  • Download URL: qnpy_latte-0.1.0.post2.tar.gz
  • Upload date:
  • Size: 52.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for qnpy_latte-0.1.0.post2.tar.gz
Algorithm Hash digest
SHA256 f1a7d873218ea53696000fab644d14f2df204f1d551542c10fed08f2944ba485
MD5 b27b9b244b710d64cbedae2336a8df1e
BLAKE2b-256 dbd8ac48aa187249fcae1aa6ef916697eab1c1eee82d6863a9a1e507b6bd5f69

See more details on using hashes here.

File details

Details for the file QNPy_Latte-0.1.0.post2-py3-none-any.whl.

File metadata

File hashes

Hashes for QNPy_Latte-0.1.0.post2-py3-none-any.whl
Algorithm Hash digest
SHA256 e6a25bceb4c2963205ce515281439e72fb9009687a8413d5b859956c33b48101
MD5 56616c386cd9c06db8d371b1232f95f3
BLAKE2b-256 2eb641707168eea6bce873235e0bb11a73e183f2fce26c04b16116a2db038347

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page