Skip to content

SkyExplain/SkyNeuralNets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

131 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 SkyNeuralNets

A Python toolkit for CMB map model selection using Neural Networks

Python License: MIT DOI arXiv


📖 Overview

SkyNeuralNets is a modular Python package for model selection on CMB temperature and polarisation maps (T, Q, U) using Neural Networks. It provides a full ML pipeline from preprocessing and standardisation to training and evaluation, to classify CMB maps between standard ΛCDM and models with oscillatory features in the primordial power spectrum.

This package is designed to work with simulated data from SkySimulation and feeds into the interpretability analysis in SkyInterpret.

This code was developed as part of the analysis pipeline for Explaining Neural Networks on the Sky: Machine Learning Interpretability for CMB Maps.


✨ Features

  • 🗂️ Preprocessing pipeline — Data preparation utilities for CMB map arrays, including cleaning and formatting for NN input
  • 📐 Standardisation and Normalisation — Supports both z-score normalisation and per-map standardisation to ensure consistent input distributions across the dataset
  • 🏗️ Hybrid PCA–MLP architecture — Implements a combined dimensionality reduction and classification network, compressing high-dimensional CMB maps before classification
  • 🎯 Model selection — Binary (and multi-class) classification between ΛCDM and non-standard primordial feature models
  • 🔧 Training utilities — Full training loop with configurable optimisers, loss functions, and early stopping fine-tuning
  • 📊 Monitoring & evaluation — Track and evaluate model performance with metrics including AUC, validation loss, accuracy, and more

📦 Installation

Requirements

  • Python ≥ 3.9
  • numpy, scipy, matplotlib
  • scikit-learn (for PCA)
  • TensorFlow (specify which one you use)

All dependencies are listed in requirements.txt.

Install

git clone https://github.com/skyexplain/SkyNeuralNets.git
cd SkyNeuralNets
pip install -e .

🚀 Quick Start

See Sandbox for tutorials and examples.


🔗 Related Packages

This repository is part of a three-package ecosystem:

Package Description
SkySimulation CMB map simulation (T, Q, U) with ΛCDM and oscillatory features
SkyNeuralNets NN-based model selection on CMB maps (this repo)
SkyInterpret Interpretability analysis of the trained neural networks

📄 Citation

If you use SkyNeuralNets in your research, please cite:

@article{ocampo2026explaining,
  author        = {Indira Ocampo and Guadalupe Cañas-Herrera},
  title         = {Explaining Neural Networks on the Sky: Machine Learning Interpretability for CMB Maps},
  year          = {2026},
  eprint        = {2604.05290},
  archivePrefix = {arXiv}
}

📬 Contact

For questions or issues, please open a GitHub Issue or contact indira.ocampo@csic.es.

About

Machine learning analysis for cosmological model selection with neural networks

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages