Gamma-ray blazar classification using machine learning with advanced weight initialization and self-supervised learning techniques

Gopal Bhatta, Sarvesh Gharat, Abhimanyu Borthakur, Aman Kumar

TL;DR

This paper introduces a novel machine learning approach to classify gamma-ray blazars into BL Lacertae objects (BL Lacs) and flat spectrum radio quasars (FSRQs). By employing advanced weight initialization and self-supervised learning techniques, the authors achieve high classification accuracy with a significantly reduced number of features and improved inference speed, making the tool more accessible and efficient for astrophysical research.

What Problem Does This Paper Address?

Blazars, a type of active galactic nucleus (AGN), are among the most luminous and variable sources in the universe, emitting non-thermal radiation across a wide electromagnetic spectrum. Astronomers typically classify blazars into two main categories: BL Lacertae objects (BL Lacs) and flat spectrum radio quasars (FSRQs). This distinction is crucial for understanding their underlying radiation mechanisms and physical properties. However, a significant portion of blazar candidates identified by instruments like the Fermi Gamma-ray Space Telescope remain in an "uncertain" category (BCUs). These BCUs lack definitive characteristics to be readily classified as either BL Lac or FSRQ, posing a challenge for comprehensive astrophysical studies. Traditional methods for classifying these uncertain sources can be computationally expensive and require extensive data. This paper aims to address this by developing a more efficient and accurate machine learning model for classifying these ambiguous blazar candidates.

Methods

The authors explore two primary machine learning approaches: traditional Artificial Neural Networks (ANNs) and self-supervised learning (SSL).

For ANNs, they investigate three distinct weight initialization strategies:

  1. Bias Initialization with Soft Voting: This method initializes weights in the final layer and uses an ensemble of models from different training epochs with a weighted average for the final prediction. This approach is particularly effective for imbalanced datasets.
  2. Supervised Greedy Pretraining: This technique involves a two-stage training process. First, the input layer is trained independently, followed by training the hidden layers while keeping the input layer weights fixed.
  3. Unsupervised Greedy Pretraining: Similar to the supervised approach, but the initial training is performed in an unsupervised manner, aiming to learn the data distribution for weight initialization.

The self-supervised learning approaches leverage pretext tasks to learn meaningful data representations before the main classification task:

  1. SSL Autoencoder Pretext: An autoencoder is trained to reconstruct its input, forcing the encoder to learn compressed representations of the data. These learned representations are then fed into a classifier.
  2. SSL Contrastive Classification: This method focuses on learning representations by bringing similar data samples closer in the feature space and pushing dissimilar samples apart. Positive and negative pairs of blazar types are used to train the model.

All models are trained using a binary cross-entropy loss function for classification, with a sigmoid activation function in the output layer to produce probabilities between 0 and 1. A threshold of 0.5 is used to assign a class (BL Lac or FSRQ).

Datasets

The primary dataset used in this study is the Fermi's fourth catalog of active galactic nuclei (AGNs) data release 3 (4LAC-DR3). This catalog contains over 6600 sources, including BL Lac objects, FSRQs, and Blazar Candidates of Uncertain type (BCUs). For their study, the authors filtered the dataset to use "clean samples," resulting in 1335 BL-Lac objects, 670 FSRQs, and 1115 BCUs. They selected 7 key features for classification: "PL_Index, nu_syn, LP_Index, Pivot_Energy, Frac_Variability, Variability_Index, and nuFnu_syn." The data was split into training, testing, and validation sets in an 80:10:10 ratio. The test data was kept completely independent to ensure unbiased evaluation.

Key Insights and Ideas

  • The power of smart initialization: The "Bias Initialization with Soft Voting" method proved to be the most effective, highlighting that intelligent initialization strategies can significantly boost performance, especially for imbalanced astrophysical datasets.
  • Self-supervised learning's potential: SSL methods, while not outperforming the best ANN approach, demonstrate promising results and offer a way to leverage unlabeled data for better feature extraction, which is crucial in astronomy where labeled datasets can be scarce.
  • Feature reduction is feasible: The study successfully uses only 7 features to achieve high accuracy, suggesting that complex models don't always require a vast number of features, making them more efficient and applicable to datasets with missing values.
  • Accessibility through efficiency: The best model's significantly faster inference speed (7x faster than some existing algorithms) and reduced parameter count make it highly practical for real-time analysis and deployment on various platforms, democratizing access to blazar classification tools.
  • The prevalence of BL Lacs in uncertain sources: The model's predictions suggest that a large majority of BCUs are likely BL Lac objects, reinforcing the idea that many uncertain sources might belong to this extreme class of AGNs.

Key Results

The "Bias Initialisation with Soft Voting" model emerged as the best performer, achieving:

  • Accuracy: 93.0%
  • Macro Average F1 Score: 0.914
  • Weighted Average F1 Score: 0.930
  • AUC: 0.949

This model also demonstrated the fastest inference speed, estimated to be at least 7 times faster than other algorithms.

When applied to the 1115 BCU sources, the best model predicted:

  • 820 BL Lacs
  • 295 FSRQs

This classification aligns with observations of a higher proportion of BL Lacs in astronomical catalogs and is supported by the photon index distributions, where predicted BL Lacs show harder spectra.

Limitations and Future Work

  • Binary Classification: The current model classifies sources strictly as either BL Lac or FSRQ. The authors acknowledge that other AGN subclasses exist and could potentially contaminate the BCU sample, though they estimate this contamination to be less than 3%. Future work could involve expanding the classification to include these other classes.
  • Data Imbalance: While the chosen methods are robust to imbalanced data, the inherent imbalance in the dataset (more BL Lacs than FSRQs) influences the predictions.
  • Model Deployment: The authors have deployed the best-performing model on Streamlit and AWS for user accessibility. However, they note that AWS app availability might be subject to credit expiry.
  • Further Refinement: The authors suggest that dedicated multi-wavelength observations could further verify and refine these classifications. The identified BL Lac sample could also serve as a target for future ground-based TeV and PeV telescopes.

Summary updated

BibTeX
@inproceedings{bhatta2024gamma,
  author = {Gopal Bhatta and Sarvesh Gharat and Abhimanyu Borthakur and Aman Kumar},
  title = {{Gamma-ray blazar classification using machine learning with advanced weight initialization and self-supervised learning techniques}},
  booktitle = {Monthly Notices of the Royal Astronomical Society},
  year = {2024},
  url = {https://openreview.net/forum?id=VmgdeiGzDc},
}
Figure