spot_img
HomeResearch & DevelopmentUnlocking Galaxy Classification: Explaining AI Decisions with Counterfactuals

Unlocking Galaxy Classification: Explaining AI Decisions with Counterfactuals

TLDR: This research introduces a novel machine learning model that not only accurately classifies galaxy morphologies but also provides “counterfactual explanations.” These explanations show what minimal changes to a galaxy image would cause it to be classified as a different type, offering insights into the AI’s decision-making process. The model uses an encoder-decoder architecture with an invertible flow to generate realistic and meaningful counterfactuals, addressing the “black-box” problem in AI for astronomical research.

The study of galaxy morphologies is crucial for understanding how galaxies evolve across the universe. Traditionally, classifying these vast cosmic structures has been a painstaking manual process, especially with the ever-growing volume of astronomical data. This challenge has led to the adoption of machine learning, particularly deep learning models, which can automate classification with impressive accuracy.

However, a significant drawback of many advanced machine learning models is their ‘black-box’ nature. They can tell us what a galaxy is, but not why they made that decision, making their results difficult to fully trust or interpret. This new research, titled “Galaxy Morphology Classification with Counterfactual Explanation,” addresses this very issue by proposing a novel approach that not only classifies galaxies effectively but also provides clear explanations for its decisions.

Understanding Counterfactual Explanations

At the heart of this research are visual counterfactual explanations (CEs). Imagine you have an image of a galaxy classified as ‘spiral.’ A counterfactual explanation would show you the smallest possible changes to that image that would make the model classify it as, say, ‘elliptical.’ This reveals which specific features the model relies on to distinguish between different galaxy types. It’s like asking, “What if this galaxy had looked slightly different?” and seeing the answer visually.

Generating these explanations isn’t straightforward. Counterfactuals must look realistic and align with how actual galaxies appear. They also need to be precise, only altering features relevant to the classification change, without changing irrelevant background details. Furthermore, extracting meaningful changes from complex, high-dimensional image data is a significant technical hurdle.

The Proposed Model: An Encoder-Decoder with Invertible Flow

To overcome these challenges, the researchers developed a model that extends a classical encoder-decoder architecture by incorporating an invertible flow. This sophisticated design allows the model to achieve strong predictive performance while also offering insights into its decision-making process.

The model works in three main parts: an encoder, a decoder, and an invertible flow. The encoder takes a galaxy image and compresses it into a ‘latent space’ – a simplified, numerical representation. The invertible flow then transforms this latent representation into a ‘hidden space,’ where galaxies of the same type are clustered together. The model classifies an input image by finding the closest cluster in this hidden space. Finally, the decoder can take a latent representation and reconstruct it back into an image.

During the ‘explanation phase,’ if the model wants to show you how a galaxy classified as ‘A’ could become ‘B,’ it takes the galaxy’s representation in the hidden space, subtly pushes it across the decision boundary towards the ‘B’ cluster, and then uses the invertible flow and decoder to translate this modified representation back into a visual image. This process ensures that the generated counterfactuals are both realistic and directly tied to the model’s internal logic.

A clever aspect of this model is its ability to separate features into ‘class-dependent’ (z1) and ‘class-independent’ (z2) components. Only the class-dependent features are used for classification, ensuring that the counterfactual explanations focus on the most relevant visual cues.

Training and Performance

The model is trained using a combination of loss functions. A reconstruction loss ensures that the generated images look like real galaxies. A Maximum Mean Discrepancy (MMD) loss helps maintain the integrity of the latent space, making sure that small changes in the numerical representation lead to meaningful, smooth changes in the image. An Information Bottleneck (IB) loss further refines the model to focus only on the essential information needed for classification, discarding irrelevant details.

The model was trained and evaluated on the Galaxy10 DECaLS dataset, which contains 17,736 galaxy images categorized into ten distinct morphological classes. It achieved an overall accuracy of approximately 80%, with performance varying across different galaxy types. For instance, ’round smooth’ galaxies were classified with high accuracy, while ‘disturbed’ galaxies, due to their complex and often ambiguous structures, had a lower accuracy of about 41%.

Insights from Counterfactuals

The visual counterfactuals provided compelling insights. When comparing ’round’ and ‘cigar-shaped’ smooth galaxies, the counterfactuals clearly showed the transformation from a rounder to a more elongated shape. Similarly, the presence or absence of a central bulge distinguished ‘edge-on’ galaxies, and the structure of the central region differentiated ‘barred’ from ‘unbarred’ spiral galaxies. Crucially, the background of the images remained unchanged, confirming that the model correctly isolated class-dependent features.

Interestingly, the model found it challenging to distinguish between very fine details, such as ‘unbarred loose spiral’ and ‘unbarred tight spiral’ galaxies. This suggests that while the model captures broad morphological differences, some subtle features might be lost during the compression into the latent space.

The research also highlighted the model’s ability to handle imbalanced datasets and its sensitivity to mislabeled samples. This sensitivity is a valuable property, as it can help identify potential issues in the training data or the model itself that might otherwise go unnoticed.

Also Read:

Looking Ahead

This work represents a significant step forward in making AI models for astronomical research more transparent and interpretable. By providing counterfactual explanations, astronomers can gain a deeper understanding of how these models arrive at their classifications, fostering greater trust and enabling new discoveries. Future work aims to improve the model’s ability to capture fine details within images and further explore the interpretability offered by the internal distributions of the invertible flow. You can read the full research paper here: Galaxy Morphology Classification with Counterfactual Explanation.

Nikhil Patel
Nikhil Patelhttps://blogs.edgentiq.com
Nikhil Patel is a tech analyst and AI news reporter who brings a practitioner's perspective to every article. With prior experience working at an AI startup, he decodes the business mechanics behind product innovations, funding trends, and partnerships in the GenAI space. Nikhil's insights are sharp, forward-looking, and trusted by insiders and newcomers alike. You can reach him out at: [email protected]

- Advertisement -

spot_img

Gen AI News and Updates

spot_img

- Advertisement -