Notebooks, scripts, and tutorials for the SkyExplain project
Sandbox is the tutorial and exploration repository for the SkyExplain project. It hosts Jupyter notebooks and scripts that demonstrate the full analysis pipeline — from CMB map simulation to neural network model selection and interpretability — developed for the paper Explaining Neural Networks on the Sky: Machine Learning Interpretability for CMB Maps.
This repository is intended as a companion to the three core packages, providing worked examples and reproducible figures.
- 🏗️ Architecture notebooks — Explore and test the hybrid PCA–MLP neural network architectures used for CMB model selection, including training configurations and performance diagnostics
- 🔍 SHAP notebooks — Apply SHAP (SHapley Additive exPlanations) to trained network predictions, compute attribution maps, and reproject them onto the HEALPix sphere
- 📊 Plot notebooks — Reproduce some of the figures from the paper, including CMB map visualisations, architecture diagnostics
This repository is part of the SkyExplain ecosystem:
| Package | Description |
|---|---|
| SkySimulation | CMB map simulation (T, Q, U) with ΛCDM and oscillatory features |
| SkyNeuralNets | NN-based model selection on CMB maps |
| SkyInterpret | Interpretability analysis of the trained neural networks |
| Sandbox | Notebooks, scripts, and tutorials (this repo) |
Clone the repository and install the required packages:
git clone https://github.com/SkyExplain/Sandbox.git
cd Sandbox
pip install -r requirements.txtFor the full pipeline, also install the core packages:
pip install -e git+https://github.com/SkyExplain/SkySimulation.git
pip install -e git+https://github.com/SkyExplain/SkyNeuralNets.git
pip install -e git+https://github.com/SkyExplain/SkyInterpret.gitIf you use this code 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}
}
}For questions or issues, please open a GitHub Issue or contact indira.ocampo@csic.es.