DiffRayve: Differentiable Ray-Wave Method for Polarized and Unpolarized Diffractive-Refractive Optical Systems

Samuel Audia, Shrey Patel, Dinesh Manocha, Matthias ZwickerarXiv 2026

TL;DR

DiffRayve introduces a fully differentiable Shooting and Bouncing Ray (SBR) algorithm that bridges the gap between geometric and physical optics to simulate both polarized and unpolarized light. This approach enables fast, gradient-based optimization of complex, wide field-of-view optical systems containing multiple diffractive and refractive elements without the prohibitive computational cost of full-wave simulations.

What Problem Does This Paper Address?

Modern optical design ("deep optics") increasingly relies on end-to-end optimization using gradients to co-design physical lenses alongside machine learning algorithms. However, existing simulation tools force a harsh trade-off between speed and physical accuracy.

Geometric Optics (GO) is fast and handles wide fields of view (FoV) but completely ignores wave effects like diffraction. Fourier Optics (FO) captures wave behavior but is restricted to small FoVs due to paraxial approximations. Full-wave methods like Finite-Difference Time-Domain (FDTD) are highly accurate but computationally crushing, often taking hours or days to simulate a single setup. Furthermore, existing hybrid methods cannot simulate polarized light or handle multiple Diffractive Optical Elements (DOEs) placed arbitrarily within a lens system.

Methods

The authors introduce DiffRayve, adapting the Shooting and Bouncing Ray (SBR) method—originally developed for radio frequency (RF) engineering—to optical design.

Figure 1. DiffRayve Illustrative Example. We develop a differentiable shooting and bouncing ray algorithm (SBR) that seamlessly captures GO and PO fields to model the ray and wave nature of light. Our method is able to optimize refractive and diffractive elements anywhere in the system and can handle polarized and unpolarized light. GO rays are traced through the lens system and at every intersection an equivalent current is calculated. Though not depicted, we sample both reflected and refracted rays using Monte Carlo integration. The surface currents are propagated to the sensor from all lens surfaces using a PO-like integral to calculate a full 3D, complex vector point spread function. The height map of diffractive elements can be optimized using the differentiable simulation to meet the lens designer’s objective. Our approach allows for any combination of refractive and diffractive elements and is not restricted to the system shown above.

Key methodological innovations include:

  • Ray-Wave Hybridization: The algorithm traces GO field rays through the lens system. At every surface intersection, it calculates equivalent electric and magnetic surface currents based on the local geometric field. These currents are then propagated to the sensor using a Physical Optics (PO) near-field integral to compute a full 3D complex vector point spread function (PSF).
  • Monte Carlo Acceleration: To prevent an exponential explosion of ray paths in multi-element systems, the authors use Monte Carlo integration to sample reflected and refracted paths, rendering the computational complexity linear relative to the number of optical elements.
  • Differentiability: Built on top of the Mitsuba 3 renderer and the Dr. Jit compiler, the entire pipeline supports automatic differentiation. This allows first-order optimizers to directly update lens parameters, such as the height maps of DOEs.
  • Polarization Tracking: Unlike previous hybrid models, DiffRayve explicitly tracks polarization and phase information influenced by changing indices of refraction and Fresnel coefficients.

Datasets

Not discussed in the traditional machine learning sense, as this paper focuses on physics-based simulation. Instead of training datasets, the method is validated against analytical ground truths:

  • An analytical Fraunhofer diffraction pattern for a circular plano-convex lens (both polarized and unpolarized).
  • An analytical solution for a square sinusoidal phase grating.

Key Insights and Ideas

  • Breaking Placement Constraints: Previous hybrid methods could only apply diffractive phase masks at the very final element of an optical path. Because DiffRayve computes equivalent currents along all boundaries, multiple DOEs can be placed anywhere in the system.
  • The Importance of the Near-Field: Standard SBR implementations use far-field approximations. DiffRayve implements a radiative near-field form of the Electric Field Integral Equation (EFIE). This is essential for capturing real-world lens physics, such as the $\cos^4(\theta)$ field drop-off and corner smearing on flat sensor planes.
  • RF to Optics Cross-Pollination: Bringing SBR from the radar and RF community into deep optics provides an elegant, highly efficient middle ground between pure rays and pure waves.

Key Results

  • High Fidelity: DiffRayve achieved 10 to 30 dB higher peak signal-to-noise ratios (PSNR) than state-of-the-art baselines (Chromatix and DeepLens) when compared against analytical solutions for scalar and vector wave scattering.
Figure 3. Scalar Wave Comparison. We validate the SBR method for use in optical lens design by comparing against Chromatix’s [7, 8] paraxial FO implementation and state-of-the-art ray-wave method, DeepLens [35], as well as the analytical solution. GO [24] is not able represent any diffraction as expected. We include PSNR values relative to the analytical solution are included in each plot. Our method either matches or beats existing approaches and succeeds at modeling the wave nature of light.
  • Speed: Simulations completed in seconds (e.g., 2.5 seconds for a sinusoidal grating), whereas some baselines took around a minute, and full-wave FDTD would take hours.
  • Multi-DOE Optimization: The authors successfully optimized a wide-FoV compound lens system containing a binary DOE, a refractive lens, and a pixel mask DOE. The optimization halved chromatic aberration at an $8^\circ$ incident angle, dropping the overall system error from 0.4 to 0.25 in just 10 minutes.

Limitations and Future Work

  • Computational Overhead for Unpolarized Light: To simulate unpolarized systems, DiffRayve must run two separate ray traces (one for each orthogonal polarization). The authors note these could be optimized into a single pass since both polarizations follow identical geometric paths.
  • Wavelength-Scale Discontinuities: SBR's approximations on surface currents mean it cannot accurately characterize structural discontinuities that are on the order of a single wavelength. Consequently, ultra-fine meta-lens designs still require higher-fidelity full-wave solvers.

Summary updated

BibTeX
@misc{audia2026diffrayve,
  author = {Samuel Audia and Shrey Patel and Dinesh Manocha and Matthias Zwicker},
  title = {{DiffRayve: Differentiable Ray-Wave Method for Polarized and Unpolarized Diffractive-Refractive Optical Systems}},
  year = {2026},
  eprint = {2609.16404},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.16404},
}
Figure