Abstract
Modeling strong gravitational lenses in order to quantify the distortions in the images of background sources and to reconstruct the mass density in the foreground lenses has traditionally been a difficult computational challenge. As the quality of gravitational lens images increases, the task of fully exploiting the information they contain becomes computationally and algorithmically more difficult. In this work, we use a neural network based on the Recurrent Inference Machine (RIM) to simultaneously reconstruct an undistorted image of the background source and the lens mass density distribution as pixelated maps. The method we present iteratively reconstructs the model parameters (the source and density map pixels) by learning the process of optimization of their likelihood given the data using the physical model (a ray-tracing simulation), regularized by a prior implicitly learned by the neural network through its training data. When compared to more traditional parametric models, the proposed method is significantly more expressive and can reconstruct complex mass distributions, which we demonstrate by using realistic lensing galaxies taken from the cosmological hydrodynamic simulation IllustrisTNG.
Introduction
Strong gravitational lensing occurs when the gravitational field of a massive foreground object, such as a galaxy or cluster, warps the light from a distant background source into arcs or rings. Analyzing these systems is a critical tool for mapping dark matter and studying the early universe. However, modeling these systems is a fundamentally ill-posed inverse problem. Traditional approaches often rely on simple parametric models (e.g., power laws) for the lens mass. While computationally efficient, these models struggle to capture the true complexity of real galaxies, which often feature irregular substructures and environmental complexities. Fully pixelated reconstructions offer the necessary flexibility but are traditionally computationally expensive and prone to overfitting without meticulous, hand-tuned regularization.
Methodology
This work introduces a deep learning framework based on the Recurrent Inference Machine (RIM) to solve the lensing equations. The RIM is designed to learn an iterative optimization algorithm that navigates the high-dimensional parameter space of pixelated maps.
Key technical features of the RIM include:
- Physical Forward Model: The network incorporates a differentiable ray-tracing simulation to calculate the likelihood of the observed data given current model parameters.
- Learned Optimization: Instead of standard optimizers, the RIM learns how to update the pixelated maps by observing the gradient of the likelihood. This allows the network to implicitly learn a "prior"—the expected spatial structure of galaxies and mass distributions—from its training data.
- Architecture: The core is a U-Net utilizing Gated Recurrent Units (GRUs) in its skip connections, enabling the model to maintain state and guide reconstructions across multiple spatial scales over several iterations.
- Test-Time Fine-Tuning: To maximize accuracy for specific high-resolution observations, the model is fine-tuned at test time. Elastic Weight Consolidation (EWC) is employed during this phase to prevent the network from "forgetting" the general physical priors learned during the initial training.
Datasets
The model was trained on a massive synthetic dataset combining real-world observations and high-fidelity simulations:
- Sources: Real galaxy images from the Hubble Space Telescope (HST) COSMOS field.
- Lens Mass (Convergence): Realistic mass distributions extracted from the IllustrisTNG-100 cosmological hydrodynamic simulation.
- Augmentation: Variational Auto-Encoders (VAEs) were used to generate millions of additional physically plausible source and mass maps to ensure the model's robustness.
Results
The RIM framework demonstrates exceptional expressivity, successfully reconstructing complex mass distributions that would be impossible to model using standard parametric forms.
As shown in Figure 4, the model achieves statistical accuracy with residuals typically within the noise level. In the first three examples, no pixels exceed a $5\sigma$ error threshold. The pixelated nature of the reconstruction allows the model to handle multiple deflectors and intricate substructures without requiring the user to pre-define the number of objects in the lens. Furthermore, the full reconstruction process, including fine-tuning, takes approximately 20 minutes on a single GPU—a significant improvement over traditional pixelated methods that can take days of manual and machine time.
Conclusion and Future Work
By replacing hand-crafted mathematical regularizers with implicit priors learned from hydrodynamic simulations, the RIM provides a powerful new tool for gravitational lens modeling. While the approach is highly efficient, its accuracy remains dependent on the diversity of the training data. Future research will focus on scaling this method for the hundreds of thousands of lenses expected from upcoming surveys like the Vera Rubin Observatory and Euclid, as well as accounting for more complex instrumental effects such as varying Point Spread Functions (PSFs).
Summary updated