Back to Blog

Building Virtual Universes to Understand Reionization

Running cosmological simulations is expensive. I mean really expensive. Each of the high-resolution simulations I use to study reionization takes about 200,000 CPU hours to complete. That's roughly 23 years if you ran it on a single processor, or about two weeks on a decent supercomputer cluster if you can get 500 cores allocated to your job.

Now imagine you want to test different scenarios—maybe reionization happened earlier, or the radiation field was stronger, or you're looking at a denser region of the universe. Each parameter combination requires its own simulation. Want to explore just 100 different scenarios? That's 20 million CPU hours, which would cost tens of thousands of dollars on commercial cloud computing.

This computational bottleneck has limited how we study cosmic reionization, one of the most important transitions in the universe's history. But what if you could get the same accuracy in seconds instead of weeks?

The Reionization Problem

Cosmic reionization happened when the first stars lit up and their radiation ionized the hydrogen gas that filled the early universe. This wasn't a uniform process—some regions got ionized early while others stayed neutral much longer. Understanding this patchy process is crucial for interpreting observations from our most powerful telescopes.

The key quantity we need to model is the column density distribution function (CDDF)—basically, how much neutral hydrogen you find at different densities throughout the universe. This determines how opaque the universe is to ionizing radiation, which affects everything from how far light can travel to how quickly reionization progresses.

Traditional approaches use simple power-law formulas to describe this distribution. But these miss the physics of self-shielding, where dense gas clouds protect themselves from radiation. It's like trying to describe a mountain range with just a straight line—you miss all the interesting peaks and valleys.

The Computational Breakthrough

Instead of running hundreds of thousands of CPU hours for each new scenario, my neural network can predict the gas distribution in under a second with 94% accuracy. This represents a speedup of roughly 10^8—that's a hundred million times faster.

200,000 CPU hours per simulation
< 1 second with neural network
94% accuracy maintained

Building a Better Model

I started by running 36 high-resolution simulations covering different reionization environments. Each one tracks how radiation affects gas on scales from individual star-forming regions up to cosmic web filaments. The resolution is fine enough to capture photoevaporation of small gas clouds—a process that's crucial for determining the final gas distribution but impossible to resolve in large-scale simulations.

From these simulations, I developed an improved mathematical description that combines a power law (for the general trend) with a Gaussian bump (for self-shielding systems). Think of it like describing a mountainous landscape: the power law gives you the overall slope, while the Gaussian captures the peaks where dense gas survives.

The real innovation is how this model depends on environment. The strength and location of the self-shielding bump changes based on when reionization happened locally, how strong the radiation field is, and whether you're in an overdense or underdense region. These dependencies can't be captured by simple, universal formulas.

Training Machines to Predict Physics

Here's where neural networks become powerful. Instead of trying to derive these environmental dependencies analytically, I let the networks learn them from the simulation data. I built a three-stage system where each network predicts different aspects of the gas distribution:

The first network learns the basic power-law parameters from environmental conditions like radiation strength and local density. The second network predicts the self-shielding bump properties, using both environmental data and the power-law predictions. The third network fine-tunes the width of the self-shielding feature.

This sequential approach works much better than trying to predict everything at once. Each stage can focus on learning specific physical relationships without getting confused by the complexity of the full problem.

Testing Against Reality

The real test is whether this approach can match observations. I used the neural network to predict mean free paths—how far ionizing photons can travel before being absorbed—and compared these to measurements from multiple telescope surveys.

The results showed that reionization timing matters enormously. Models where reionization finished early (around redshift 8) consistently overpredict how transparent the universe should be. This happens because early reionization gives the universe more time to rebuild dense structures that block radiation.

Late reionization scenarios, ending around redshift 6, match the observations much better. When I fit the model to data, I get tight constraints: a photoionization rate of 0.32 Ă— 10^-12 s^-1 and reionization completing at redshift 6.4. These values align well with independent estimates from other methods.

Beyond Computational Efficiency

The speedup from neural networks isn't just about convenience—it enables entirely new types of analysis. Parameter space exploration that would have required years of supercomputer time can now be done interactively. You can test hundreds of reionization scenarios in the time it takes to get coffee.

This also makes the science more accessible. Other researchers can use the trained networks without needing access to massive computing resources. It democratizes high-resolution reionization modeling in a way that wasn't possible before.

The approach extends beyond reionization. Any astrophysical problem involving multi-scale physics—galaxy formation, stellar feedback, planet formation—could benefit from this hybrid simulation-machine learning strategy. You run detailed simulations to capture the physics, then use neural networks to interpolate efficiently across parameter space.

Looking Forward

I'm already working on extensions that account for the extended, patchy nature of reionization instead of assuming it happened instantly everywhere. The neural network framework makes it feasible to incorporate realistic reionization histories and test them against existing as well as upcoming observations.

Each new dataset gives us better constraints on how reionization actually proceeded. With tools that can rapidly test theoretical predictions against observations, we're moving from rough sketches of reionization to detailed portraits of how the universe transitioned from its dark ages to the light-filled cosmos we see today.