Skip to content

RobertxPearce/ksz-tau-predictor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This project explores whether machine learning can predict the optical depth (τ) of the early universe from kSZ (kinetic Sunyaev-Zel'dovich) heat maps, using a dataset of 1,000 simulations provided by Dr. Paul La Plante. These simulations model various reionization scenarios and generate corresponding τ values and 2D kSZ maps of the Cosmic Microwave Background (CMB).

Motivation

The τ value summarizes how much ionized gas scattered CMB photons along their journey from the early universe. Since the relationship between spatial kSZ features and τ is complex and nonlinear, we trained a neural network to learn this mapping and estimate τ values directly from kSZ maps.

Dataset

Tau Value

kSZ Map

  • Source: Simulations by Dr. Paul La Plante
  • Size: 1,000 reionization scenarios
  • Each simulation includes:
    • kSZ Heat Map: A 1024×1024 image of temperature shifts in the CMB
    • Tau (τ) Value: Optical depth to the CMB
  • Model Type: Semi-numeric "inside-out" reionization model

Code Workflow

  • Data loading and normalization
  • Custom PyTorch dataset object
  • Neural network architecture (CNN-based)
  • CUDA acceleration for GPU training
  • Training/validation split
  • Model evaluation and prediction

Analysis & Results

Training Behavior

Loss Curve

  • Sharp drop in loss after epoch 1
  • No divergence between traiing and validation loss
  • No signs of overfitting

Acccuracy Check

Predicted vs True Tau Values

  • Model performs best on mid-range τ values (~0.4–0.5)
  • Underestimates high τ and overestimates low τ

Residuals

Residual Plot

  • Clear signs of regression to the mean
  • Overestimation at low τ, underestimation at high τ

Prediction Error Histogram

Histogram of Prediction Errors

  • Slight skew toward underestimating τ
  • Most errors centered around zero

Conclusion

Successfully built a neural network to predict τ from simulated kSZ maps. Model captures trends but shows systematic bias toward the mean. Future work could include more complex models or better feature extraction techniques.

About

A neural network model for predicting optical depth (τ) from simulated kSZ heat maps of the early universe.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors