Raytracing Black Holes with AI Accelerators

arXiv:2609.26963 · physics.ed-ph, gr-qc · Submitted 2026-09-22 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: Physics. The day in general physics: instruments, methods and results across the field.

Kai: I'm Kai.

Mira: And I'm Mira, here with Lev.

Kai: We're looking at the paper: "Raytracing Black Holes with AI Accelerators".

Paper summary: Kai: So, looking at the whole thing, "Raytracing Black Holes with AI Accelerators" is essentially demonstrating that you can build a fully self-contained black hole raytracer using very little Python code by leveraging JAX. The authors are showing how this infrastructure is useful for professional physicists wanting to simplify numerical work and for computer science folks who might not have realized they could tackle general relativity through differentiable algorithms > Raytracing Black Holes with AI Accelerators <ref:2609.26963#pg1>

Mira: I think the core message is that you don't need a deep symbolic math background to get a handle on general relativity if you approach it through these differentiable, algorithmic descriptions. It makes the theory tangible by emphasizing concrete physical quantities rather than just abstract equations > Raytracing Black Holes with AI Accelerators <ref:2609.26963#pg1>

Lev: From an engineering standpoint, what this construction does is show that the overhead for running this kind of simulation lands in how efficiently you can parallelize the integration across multiple pixels using JAX's capabilities > Raytracing Black Holes with AI Accelerators <ref:2609.26963#pg2>

Kai: They manage to do this by setting up a physically orthonormal local spacetime basis at an observer point and then parallelizing the ODE integration for multiple pixels, which allows for fast rendering on GPUs > Raytracing Black Holes with AI Accelerators <ref:2609.26963#pg2>

Mira: The authors also touch upon checking if source-free solutions like the schwarzschild exterior satisfy einstein's field equations using this JAX numerics approach, which is a strong way to verify physical models > Raytracing Black Holes with AI Accelerators <ref:2609.26963#pg3>

Lev: They do have to be careful about what this method does not cover, and they point out that it focuses on constructing the raytracer itself rather than solving some of the more complex dynamics beyond just the initial light path calculation > Raytracing Black Holes with AI Accelerators <ref:2609.26963#pg1>

Kai: So, in simple terms, this paper shows that using modern AI accelerator frameworks can help translate complex physics into fast, executable code for visualization and verification purposes. It’s about making physics tangible through differentiable algorithms > Raytracing Black Holes with AI Accelerators <ref:2609.26963#pg1>

Conclusion: Kai: So, this paper is about taking something really hard, general relativity, and using AI infrastructure to build a raytracer for black holes without needing massive amounts of traditional computation or complex symbolic math from the start.

Mira: Exactly. They built this whole raytracer using JAX, which is great because it lets you use automatic differentiation to figure out things like the curvature terms directly from the line element function.

Lev: From my side, what's interesting is that they managed to get this running on hardware and parallelize the integration across multiple pixels, which means it’s not just a theoretical exercise but something that actually scales well for image generation.

Kai: I mean, it shows how ML accelerator frameworks like JAX can be used to turn complicated physics constructions into fast, GPU-accelerated code that you can actually run.

Mira: It really makes the physics tangible by showing concrete physical quantities in an executable format instead of just abstract equations on a page.

Lev: And they even used it to numerically check if source-free solutions, like the schwarzschild exterior for a black hole, actually satisfy einstein's field equations, which is a solid verification step.

Kai: The authors are suggesting that this approach might be useful for making other technical subjects accessible by emphasizing how physical laws can be narrated through these differentiable algorithms.

Mira: It’s about building bridges between different disciplines by finding a shared language that uses concrete physical quantities instead of just pure mathematics.

Lev: The method itself is applicable not just to black holes, but for efficient image generation for higher dimensional objects too, which is a pretty big thing for computational physics.

Kai: So, the main point here is that if you can build this kind of system, you’re showing people how powerful these AI-driven tools can be at translating complex theory into practical, high-performance computation.

Mira: It opens up a path for other fields to use this same differentiable approach to make their theories more intuitive and verifiable through code.

Lev: We need to see if we can push this further onto real hardware and see how the overhead really lands when you try to run these geodesic integrations at a production speed.

Thomas Fischbacher, Nicholas Kessler

Google · ETH Zurich

physics.ed-ph, gr-qc

Submitted: 2026-09-22

Updated: 2026-09-22

Code: https://github.com/fischbacher/IMPRS2022_ML

Importance score: 96/100

The gist: The paper demonstrates how software infrastructure built for AI applications, specifically leveraging JAX…

Key concepts

JAX
A machine learning accelerator framework that enables automatic differentiation. It allows the system to compute complex derivatives needed for physics calculations efficiently, which is key to deriving geometric properties from simple mathematical descriptions.
Geodesics
These are defined as the 'straight lines' in curved spacetime. The paper finds them by solving a system of coupled differential equations where a path follows its own tangent vector, allowing the tracer to determine the actual paths light takes near a black hole.
Christoffel Symbols
These are components derived directly from the line element describing spacetime curvature. JAX automatically computes these symbols, which are essential inputs for calculating more complex tensors like the Riemann and Einstein Tensors that describe gravity's effects.

Terminology

Summary

The paper demonstrates how software infrastructure built for AI applications, specifically leveraging JAX, can be utilized to construct a fully self-contained black hole raytracer using under 180 lines of Python code plus documentation. p. 0 The primary motivations are threefold: to illustrate how ML accelerators can simplify building numerical applications for professional physicists, to make General Relativity accessible to computer science professionals, and to inspire students and educators toward approaches that represent physical laws through differentiable algorithms rather than solely symbolic expressions. p. 0

The construction involves a systematic sequence of steps:

  1. Geometry without Cartesian Coordinates: Introducing methods for working with generic non-Cartesian coordinate systems, exemplified by the stereographic projection of a sphere.

  2. Parallel Transport in Curved Spaces: Discussing parallel transport to define straight lines in curved space, leading to holonomy as a consequence of curvature.

  3. Computing Parallel Transport Coordinate Corrections: Employing the JAX framework to quantitatively derive parallel transport vector coordinate corrections by computing the Hessian of the length-squared function with respect to rate-of-change variables.

  4. Geodesics as Autoparallel Curves: Defining geodesics as paths that parallel transport their own tangent vector, resulting in a system of coupled second-order Ordinary Differential Equations (ODEs).

  5. Numerical Differential Equations: Implementing numerical ODE solvers, such as the Runge-Kutta RK4 scheme using JAX's lax.scan, to solve the geodesic equation.

  6. Aspects of Raytracing in a Black Hole Geometry: Generalizing the treatment from 2D surfaces to 3+1D curved spacetime and extracting the metric tensor from a line element, which serves as the crucial input for raytracing.

The paper leverages JAX's automatic differentiation capabilities to compute Christoffel symbols directly from the line element function, which are then used to derive the Riemann and Einstein Tensors. The final raytracer utilizes numerical ODE integration to determine sample points along geodesics and employs JAX's vectorization features for GPU parallelism during image patch rendering. The skeletal framework includes establishing a physically orthonormal local spacetime basis at an observer point, converting vector coefficients, finding the initial tangent vector corresponding to lightspeed motion backward in time, and parallelizing ODE integration for multiple pixels. The implementation successfully renders an image of a black hole using the Schwarzschild solution and extends this to Kerr geometry for rotating black holes with accretion discs. p. 1

The authors emphasize that this methodology captures physical meaning within executable code, allowing complex topics like General Relativity to be narrated through algorithmic descriptions rather than purely mathematical equations. p. 3 This approach is highlighted as a potent tool for making other technical subjects tangible by emphasizing concrete physical quantities. p. 0 Furthermore, the work touches upon the relationship between matter and geometry, demonstrating how source-free solutions (like the Schwarzschild exterior) can be numerically verified using JAX-based numerics to check satisfaction of Einstein's field equations.

The paper concludes by discussing broader implications: ML accelerator frameworks like JAX can serve as powerful enabling tools for transforming nontrivial physics constructions into fast, GPU-accelerated code. p. 2 The authors suggest that if this construction proves advantageous for explaining General Relativity—a complex theory—similar approaches emphasizing making physics tangible through differentiable algorithms could be highly effective when attempting to make other theories accessible. p. 0 They stress the importance of mastering the entire chain connecting abstract mathematics to low-level numerics for a deep understanding of General Relativity, and believe this method is vital for building bridges between disciplines by enlarging their shared language for expressing ideas. p. 0 The methods are also noted as directly applicable to problems concerning efficient image generation for higher-dimensional objects.

Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.

Improvements for AI systems

  1. Make numerical applications of General Relativity accessible to computer science professionals who may lack a mathematical background by representing physical law in differentiable algorithms instead of differentiable symbolic expressions. This allows readers familiar with ML frameworks like JAX to build and verify quantitative theories, as the paper demonstrates a fully self-contained raytracer construction in under 180 lines of code plus documentation.

  2. Develop a framework for computing geometric quantities in curved spaces by using the metric tensor evaluated at a point P, which is derived from the Hessian of the line element function with respect to coordinate rate-of-change variables. This approach enables readers to calculate geometrically meaningful local scalar product between (velocity-)vectors directly from coordinate representations.

  3. Implement numerical ODE solvers for geodesic motion using JAX's lax scan function and an RK4 integration scheme, which allows for the computation of the rate of change function required by the geodesic equation at each step. This provides a robust method for obtaining trajectories from initial conditions in curved spacetime.

  4. Create a black hole raytracing system that renders images using JAX to perform imagepatches computations and numpy-based post-processing to translate geodesic data into visual information, including features like an equatorial ring or an accretion disc modeled by the Kerr metric. This allows for the visualization of phenomena such as gravitational light-bending and relativistic beaming.

  5. Design a method for verifying that a proposed space-time solution is a vacuum solution by computing the Einstein tensor Gij using JAX functions derived from the line element, allowing researchers to check if Gij = 0 needs to hold for every (i, j) index-pair at every point where we evaluate local curvature.

Sources

Related papers